From 5e2707d343587c7fa588159949a479f1f1962922 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 23 Feb 2024 17:23:47 +0100 Subject: [PATCH] Fix new lint warnings --- lintcheck/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lintcheck/src/main.rs b/lintcheck/src/main.rs index 88966b41f69..66442998161 100644 --- a/lintcheck/src/main.rs +++ b/lintcheck/src/main.rs @@ -749,7 +749,7 @@ fn print_stats(old_stats: HashMap, new_stats: HashMap<&String, us // list all new counts (key is in new stats but not in old stats) new_stats_deduped .iter() - .filter(|(new_key, _)| old_stats_deduped.get::(new_key).is_none()) + .filter(|(new_key, _)| !old_stats_deduped.contains_key::(new_key)) .for_each(|(new_key, new_value)| { println!("{new_key} 0 => {new_value}"); }); @@ -757,7 +757,7 @@ fn print_stats(old_stats: HashMap, new_stats: HashMap<&String, us // list all changed counts (key is in both maps but value differs) new_stats_deduped .iter() - .filter(|(new_key, _new_val)| old_stats_deduped.get::(new_key).is_some()) + .filter(|(new_key, _new_val)| old_stats_deduped.contains_key::(new_key)) .for_each(|(new_key, new_val)| { let old_val = old_stats_deduped.get::(new_key).unwrap(); println!("{new_key} {old_val} => {new_val}"); @@ -766,7 +766,7 @@ fn print_stats(old_stats: HashMap, new_stats: HashMap<&String, us // list all gone counts (key is in old status but not in new stats) old_stats_deduped .iter() - .filter(|(old_key, _)| new_stats_deduped.get::<&String>(old_key).is_none()) + .filter(|(old_key, _)| !new_stats_deduped.contains_key::<&String>(old_key)) .filter(|(old_key, _)| lint_filter.is_empty() || lint_filter.contains(old_key)) .for_each(|(old_key, old_value)| { println!("{old_key} {old_value} => 0");