@@ -25,15 +25,17 @@ use clap::{Arg, ArgAction, ArgMatches, Command};
2525use custom_str_cmp:: custom_str_cmp;
2626
2727use ext_sort:: ext_sort;
28- use fnv:: FnvHasher ;
2928use numeric_str_cmp:: { NumInfo , NumInfoParseSettings , human_numeric_str_cmp, numeric_str_cmp} ;
3029use rand:: { Rng , rng} ;
3130use rayon:: prelude:: * ;
31+ use rustc_hash:: FxHashMap as HashMap ;
32+ use rustc_hash:: FxHasher as Hasher ;
3233use std:: cmp:: Ordering ;
3334use std:: env;
3435use std:: ffi:: { OsStr , OsString } ;
3536use std:: fs:: { File , OpenOptions } ;
36- use std:: hash:: { Hash , Hasher } ;
37+ use std:: hash:: Hash ;
38+ use std:: hash:: Hasher as _;
3739use std:: io:: { BufRead , BufReader , BufWriter , Read , Write , stdin, stdout} ;
3840use std:: num:: { IntErrorKind , NonZero } ;
3941use std:: ops:: Range ;
@@ -1680,7 +1682,7 @@ fn index_legacy_warnings(processed_args: &[OsString], legacy_warnings: &mut [Leg
16801682 return ;
16811683 }
16821684
1683- let mut index_by_arg = std :: collections :: HashMap :: new ( ) ;
1685+ let mut index_by_arg = HashMap :: default ( ) ;
16841686 for ( warning_idx, warning) in legacy_warnings. iter ( ) . enumerate ( ) {
16851687 index_by_arg. insert ( warning. arg_index , warning_idx) ;
16861688 }
@@ -2919,7 +2921,7 @@ fn salt_from_random_source(path: &Path) -> UResult<[u8; SALT_LEN]> {
29192921 let mut reader = open_with_open_failed_error ( path) ?;
29202922 let mut buf = [ 0u8 ; BUF_LEN ] ;
29212923 let mut total = 0usize ;
2922- let mut hasher = FnvHasher :: default ( ) ;
2924+ let mut hasher = Hasher :: default ( ) ;
29232925
29242926 loop {
29252927 let n = reader
@@ -2944,7 +2946,7 @@ fn salt_from_random_source(path: &Path) -> UResult<[u8; SALT_LEN]> {
29442946 }
29452947
29462948 let first = hasher. finish ( ) ;
2947- let mut second_hasher = FnvHasher :: default ( ) ;
2949+ let mut second_hasher = Hasher :: default ( ) ;
29482950 second_hasher. write ( RANDOM_SOURCE_TAG ) ;
29492951 second_hasher. write_u64 ( first) ;
29502952 let second = second_hasher. finish ( ) ;
@@ -2956,7 +2958,7 @@ fn salt_from_random_source(path: &Path) -> UResult<[u8; SALT_LEN]> {
29562958}
29572959
29582960fn get_hash < T : Hash > ( t : & T ) -> u64 {
2959- let mut s = FnvHasher :: default ( ) ;
2961+ let mut s = Hasher :: default ( ) ;
29602962 t. hash ( & mut s) ;
29612963 s. finish ( )
29622964}
0 commit comments