changeset 45618:d5407b2e7689

rust: leverage improved match ergonomics Differential Revision: https://phab.mercurial-scm.org/D9137
author Raphaël Gomès <rgomes@octobus.net>
date Thu, 01 Oct 2020 09:49:33 +0200
parents 7bd13bf99d1c
children 64461b43a7bf
files rust/hg-core/src/dirstate/status.rs
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate/status.rs	Mon Sep 28 15:08:02 2020 +0200
+++ b/rust/hg-core/src/dirstate/status.rs	Thu Oct 01 09:49:33 2020 +0200
@@ -730,7 +730,7 @@
                         .symlink_metadata();
 
                     match meta {
-                        Ok(ref m)
+                        Ok(m)
                             if !(m.file_type().is_file()
                                 || m.file_type().is_symlink()) =>
                         {
@@ -749,7 +749,7 @@
                             );
                             Ok((Cow::Owned(filename), dispatch))
                         }
-                        Err(ref e)
+                        Err(e)
                             if e.kind() == ErrorKind::NotFound
                                 || e.raw_os_error() == Some(20) =>
                         {
@@ -783,7 +783,7 @@
                 let meta =
                     self.root_dir.join(filename_as_path).symlink_metadata();
                 match meta {
-                    Ok(ref m)
+                    Ok(m)
                         if !(m.file_type().is_file()
                             || m.file_type().is_symlink()) =>
                     {
@@ -802,7 +802,7 @@
                             self.options,
                         ),
                     )),
-                    Err(ref e)
+                    Err(e)
                         if e.kind() == ErrorKind::NotFound
                             || e.raw_os_error() == Some(20) =>
                     {