File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,9 @@ use std::collections::BTreeMap;
3434#[ cfg( feature = "raw_value" ) ]
3535use std:: collections:: HashMap ;
3636use std:: fmt:: { self , Debug } ;
37- use std:: hash:: { BuildHasher , Hash , Hasher } ;
37+ use std:: hash:: BuildHasher ;
38+ #[ cfg( feature = "raw_value" ) ]
39+ use std:: hash:: { Hash , Hasher } ;
3840use std:: io;
3941use std:: iter;
4042use std:: marker:: PhantomData ;
@@ -2490,11 +2492,7 @@ fn test_value_into_deserializer() {
24902492#[ test]
24912493fn hash_positive_and_negative_zero ( ) {
24922494 let rand = std:: hash:: RandomState :: new ( ) ;
2493- let hash = |obj : Number | -> u64 {
2494- let mut hasher = rand. build_hasher ( ) ;
2495- obj. hash ( & mut hasher) ;
2496- hasher. finish ( )
2497- } ;
2495+ let hash = |obj| rand. hash_one ( obj) ;
24982496
24992497 let k1 = serde_json:: from_str :: < Number > ( "0.0" ) . unwrap ( ) ;
25002498 let k2 = serde_json:: from_str :: < Number > ( "-0.0" ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments