Patchwork D8538: rust: fix warning about unnecessary mut

login
register
mail settings
Submitter phabricator
Date May 17, 2020, 4:33 p.m.
Message ID <differential-rev-PHID-DREV-ytpoced2txga3gpu4yjg-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46326/
State Superseded
Headers show

Comments

phabricator - May 17, 2020, 4:33 p.m.
valentin.gatienbaron created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  If there's a reason to use mut (like compability with older
  compilers), then we should stick `#[allow(unused_mut)]` on the
  declaration.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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

CHANGE DETAILS




To: valentin.gatienbaron, #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
@@ -847,7 +847,7 @@ 
     Vec<PatternFileWarning>,
 )> {
     // Needs to outlive `dir_ignore_fn` since it's captured.
-    let mut ignore_fn: IgnoreFnType;
+    let ignore_fn: IgnoreFnType;
 
     // Only involve real ignore mechanism if we're listing unknowns or ignored.
     let (dir_ignore_fn, warnings): (IgnoreFnType, _) = if options.list_ignored