Patchwork D9137: rust: leverage improved match ergonomics

login
register
mail settings
Submitter phabricator
Date Oct. 1, 2020, 7:58 a.m.
Message ID <differential-rev-PHID-DREV-mi3m2ct6sti65w6steu2-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47358/
State Superseded
Headers show

Comments

phabricator - Oct. 1, 2020, 7:58 a.m.
Alphare created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9137

AFFECTED FILES
  rust/hg-core/src/dirstate/status.rs

CHANGE DETAILS




To: Alphare, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/rust/hg-core/src/dirstate/status.rs b/rust/hg-core/src/dirstate/status.rs
--- a/rust/hg-core/src/dirstate/status.rs
+++ b/rust/hg-core/src/dirstate/status.rs
@@ -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) =>
                     {