about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-02-23 17:23:47 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2024-02-24 15:02:10 +0100
commit5e2707d343587c7fa588159949a479f1f1962922 (patch)
tree1ec00c3b08ad9b3b891dde654e0bfd1fbbcae633
parenta1971414ec707df5a4071f91c4beaf5123aa8d18 (diff)
downloadrust-5e2707d343587c7fa588159949a479f1f1962922.tar.gz
rust-5e2707d343587c7fa588159949a479f1f1962922.zip
Fix new lint warnings
-rw-r--r--lintcheck/src/main.rs6
1 files 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<String, usize>, 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::<str>(new_key).is_none())
+        .filter(|(new_key, _)| !old_stats_deduped.contains_key::<str>(new_key))
         .for_each(|(new_key, new_value)| {
             println!("{new_key} 0 => {new_value}");
         });
@@ -757,7 +757,7 @@ fn print_stats(old_stats: HashMap<String, usize>, 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::<str>(new_key).is_some())
+        .filter(|(new_key, _new_val)| old_stats_deduped.contains_key::<str>(new_key))
         .for_each(|(new_key, new_val)| {
             let old_val = old_stats_deduped.get::<str>(new_key).unwrap();
             println!("{new_key} {old_val} => {new_val}");
@@ -766,7 +766,7 @@ fn print_stats(old_stats: HashMap<String, usize>, 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");