We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9bcbad commit b328ee7Copy full SHA for b328ee7
tests/test.rs
@@ -2492,15 +2492,14 @@ fn test_value_into_deserializer() {
2492
#[test]
2493
fn hash_positive_and_negative_zero() {
2494
let rand = std::hash::RandomState::new();
2495
- let hash = |obj| rand.hash_one(obj);
2496
2497
let k1 = serde_json::from_str::<Number>("0.0").unwrap();
2498
let k2 = serde_json::from_str::<Number>("-0.0").unwrap();
2499
if cfg!(feature = "arbitrary_precision") {
2500
assert_ne!(k1, k2);
2501
- assert_ne!(hash(k1), hash(k2));
+ assert_ne!(rand.hash_one(k1), rand.hash_one(k2));
2502
} else {
2503
assert_eq!(k1, k2);
2504
- assert_eq!(hash(k1), hash(k2));
+ assert_eq!(rand.hash_one(k1), rand.hash_one(k2));
2505
}
2506
0 commit comments