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;
34
34
#[ cfg( feature = "raw_value" ) ]
35
35
use std:: collections:: HashMap ;
36
36
use 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 } ;
38
40
use std:: io;
39
41
use std:: iter;
40
42
use std:: marker:: PhantomData ;
@@ -2490,11 +2492,7 @@ fn test_value_into_deserializer() {
2490
2492
#[ test]
2491
2493
fn hash_positive_and_negative_zero ( ) {
2492
2494
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) ;
2498
2496
2499
2497
let k1 = serde_json:: from_str :: < Number > ( "0.0" ) . unwrap ( ) ;
2500
2498
let k2 = serde_json:: from_str :: < Number > ( "-0.0" ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments