Mercurial > public > mercurial-scm > hg
diff rust/hg-core/src/matchers.rs @ 51703:ec7171748350
rust: apply clippy lints
They are at most harmless and at best make the codebase more readable and
simpler.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Thu, 18 Jul 2024 13:35:39 +0200 |
parents | 7f0cb9ee0534 |
children | b2e90465daf6 |
line wrap: on
line diff
--- a/rust/hg-core/src/matchers.rs Tue Jul 23 14:25:23 2024 +0200 +++ b/rust/hg-core/src/matchers.rs Thu Jul 18 13:35:39 2024 +0200 @@ -617,7 +617,11 @@ std::mem::swap(&mut m1, &mut m2); } m1.file_set().map(|m1_files| { - m1_files.iter().cloned().filter(|f| m2.matches(f)).collect() + m1_files + .iter() + .filter(|&f| m2.matches(f)) + .cloned() + .collect() }) } else { // without exact input file sets, we can't do an exact @@ -710,7 +714,7 @@ }; if base_is_exact { new.files = base_files.map(|files| { - files.iter().cloned().filter(|f| new.matches(f)).collect() + files.iter().filter(|&f| new.matches(f)).cloned().collect() }); } new