rust: fix warning about unnecessary mut
authorValentin Gatien-Baron <valentin.gatienbaron@gmail.com>
Sun, 17 May 2020 12:28:32 -0400
changeset 44842 73d6ce2746d2
parent 44841 526d69eeea31
child 44843 288328c6711b
rust: fix warning about unnecessary mut If there's a reason to use mut (like compability with older compilers), then we should stick `#[allow(unused_mut)]` on the declaration. Differential Revision: https://phab.mercurial-scm.org/D8538
rust/hg-core/src/dirstate/status.rs
--- a/rust/hg-core/src/dirstate/status.rs	Tue Apr 14 06:09:14 2020 +0200
+++ b/rust/hg-core/src/dirstate/status.rs	Sun May 17 12:28:32 2020 -0400
@@ -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