@@ -43,7 +43,7 @@ use rustc_macros::{Decodable, Encodable, HashStable_Generic};
43
43
use rustc_serialize:: opaque:: { FileEncoder , MemDecoder } ;
44
44
use rustc_serialize:: { Decodable , Decoder , Encodable , Encoder } ;
45
45
use tracing:: debug;
46
- use xxhash_rust :: xxh3;
46
+ use twox_hash :: xxh3:: { self , HasherExt } ;
47
47
48
48
mod caching_source_map_view;
49
49
pub mod source_map;
@@ -78,7 +78,7 @@ use rustc_data_structures::sync::{FreezeLock, FreezeWriteGuard, Lock, Lrc};
78
78
use std:: borrow:: Cow ;
79
79
use std:: cmp:: { self , Ordering } ;
80
80
use std:: fmt:: Display ;
81
- use std:: hash:: Hash ;
81
+ use std:: hash:: { Hash , Hasher } ;
82
82
use std:: io:: { self , Read } ;
83
83
use std:: ops:: { Add , Range , Sub } ;
84
84
use std:: path:: { Path , PathBuf } ;
@@ -1531,7 +1531,7 @@ impl SourceFileHash {
1531
1531
value. copy_from_slice ( & Sha256 :: digest ( data) ) ;
1532
1532
}
1533
1533
SourceFileHashAlgorithm :: XxHash => {
1534
- value. copy_from_slice ( & xxh3:: xxh3_128 ( data) . to_be_bytes ( ) ) ;
1534
+ value. copy_from_slice ( & xxh3:: hash128 ( data) . to_be_bytes ( ) ) ;
1535
1535
}
1536
1536
} ;
1537
1537
hash
@@ -1569,9 +1569,9 @@ impl SourceFileHash {
1569
1569
match kind {
1570
1570
SourceFileHashAlgorithm :: XxHash => {
1571
1571
digest (
1572
- xxh3:: Xxh3 :: new ( ) ,
1573
- |h, b| h. update ( b) ,
1574
- |h, out| out. copy_from_slice ( & h. digest128 ( ) . to_be_bytes ( ) ) ,
1572
+ xxh3:: Hash128 :: default ( ) ,
1573
+ |h, b| h. write ( b) ,
1574
+ |h, out| out. copy_from_slice ( & h. finish_ext ( ) . to_be_bytes ( ) ) ,
1575
1575
src,
1576
1576
& mut buf,
1577
1577
value,
0 commit comments