@@ -749,15 +749,15 @@ fn print_stats(old_stats: HashMap<String, usize>, new_stats: HashMap<&String, us
749
749
// list all new counts (key is in new stats but not in old stats)
750
750
new_stats_deduped
751
751
. 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) )
753
753
. for_each ( |( new_key, new_value) | {
754
754
println ! ( "{new_key} 0 => {new_value}" ) ;
755
755
} ) ;
756
756
757
757
// list all changed counts (key is in both maps but value differs)
758
758
new_stats_deduped
759
759
. 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) )
761
761
. for_each ( |( new_key, new_val) | {
762
762
let old_val = old_stats_deduped. get :: < str > ( new_key) . unwrap ( ) ;
763
763
println ! ( "{new_key} {old_val} => {new_val}" ) ;
@@ -766,7 +766,7 @@ fn print_stats(old_stats: HashMap<String, usize>, new_stats: HashMap<&String, us
766
766
// list all gone counts (key is in old status but not in new stats)
767
767
old_stats_deduped
768
768
. 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) )
770
770
. filter ( |( old_key, _) | lint_filter. is_empty ( ) || lint_filter. contains ( old_key) )
771
771
. for_each ( |( old_key, old_value) | {
772
772
println ! ( "{old_key} {old_value} => 0" ) ;
0 commit comments