From 1a042860d244a400be9bfe625de9edf2fcfb72ba Mon Sep 17 00:00:00 2001 From: behzad nouri Date: Thu, 19 Dec 2024 11:56:37 -0600 Subject: [PATCH] clones inside the loop --- perf/src/deduper.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perf/src/deduper.rs b/perf/src/deduper.rs index 2a985b9c7a0383..36213cf1f65877 100644 --- a/perf/src/deduper.rs +++ b/perf/src/deduper.rs @@ -67,7 +67,8 @@ impl Deduper { #[allow(clippy::arithmetic_side_effects)] pub fn dedup(&self, data: &T) -> bool { let mut out = true; - for mut hasher in self.hashers.iter().map(AHasher::clone) { + for hasher in &self.hashers { + let mut hasher = hasher.clone(); data.hash(&mut hasher); let hash: u64 = hasher.finish() % self.num_bits; let index = (hash >> 6) as usize;