Skip to content

Commit 5e2707d

Browse files
Fix new lint warnings
1 parent a197141 commit 5e2707d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lintcheck/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -749,15 +749,15 @@ fn print_stats(old_stats: HashMap<String, usize>, new_stats: HashMap<&String, us
749749
// list all new counts (key is in new stats but not in old stats)
750750
new_stats_deduped
751751
.iter()
752-
.filter(|(new_key, _)| old_stats_deduped.get::<str>(new_key).is_none())
752+
.filter(|(new_key, _)| !old_stats_deduped.contains_key::<str>(new_key))
753753
.for_each(|(new_key, new_value)| {
754754
println!("{new_key} 0 => {new_value}");
755755
});
756756

757757
// list all changed counts (key is in both maps but value differs)
758758
new_stats_deduped
759759
.iter()
760-
.filter(|(new_key, _new_val)| old_stats_deduped.get::<str>(new_key).is_some())
760+
.filter(|(new_key, _new_val)| old_stats_deduped.contains_key::<str>(new_key))
761761
.for_each(|(new_key, new_val)| {
762762
let old_val = old_stats_deduped.get::<str>(new_key).unwrap();
763763
println!("{new_key} {old_val} => {new_val}");
@@ -766,7 +766,7 @@ fn print_stats(old_stats: HashMap<String, usize>, new_stats: HashMap<&String, us
766766
// list all gone counts (key is in old status but not in new stats)
767767
old_stats_deduped
768768
.iter()
769-
.filter(|(old_key, _)| new_stats_deduped.get::<&String>(old_key).is_none())
769+
.filter(|(old_key, _)| !new_stats_deduped.contains_key::<&String>(old_key))
770770
.filter(|(old_key, _)| lint_filter.is_empty() || lint_filter.contains(old_key))
771771
.for_each(|(old_key, old_value)| {
772772
println!("{old_key} {old_value} => 0");

0 commit comments

Comments
 (0)