From 73066e7e487261eeae62a4c7242c6c6dc0ac4ef8 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Tue, 7 Jun 2022 15:21:29 +1000 Subject: [PATCH] Use values() to iterate map values Clippy emits: warning: you seem to want to iterate on a map's values As suggested, iterate using `values`. --- src/util/bip158.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/bip158.rs b/src/util/bip158.rs index 25f05b70..f736d80e 100644 --- a/src/util/bip158.rs +++ b/src/util/bip158.rs @@ -573,7 +573,7 @@ mod test { assert!(filter.match_all(block_hash, &mut txmap.iter() .filter_map(|(_, s)| if !s.is_empty() { Some(s.as_bytes()) } else { None })).unwrap()); - for (_, script) in &txmap { + for script in txmap.values() { let query = vec![script]; if !script.is_empty () { assert!(filter.match_any(block_hash, &mut query.iter()