diff --git a/bigint/src/lib.rs b/bigint/src/lib.rs index 5d261da..586eeec 100644 --- a/bigint/src/lib.rs +++ b/bigint/src/lib.rs @@ -120,8 +120,9 @@ use std::hash; #[cfg(test)] fn hash(x: &T) -> u64 { - use std::hash::Hasher; - let mut hasher = hash::SipHasher::new(); + use std::hash::{BuildHasher, Hasher}; + use std::collections::hash_map::RandomState; + let mut hasher = ::Hasher::new(); x.hash(&mut hasher); hasher.finish() } diff --git a/complex/src/lib.rs b/complex/src/lib.rs index c73cb42..cb605a2 100644 --- a/complex/src/lib.rs +++ b/complex/src/lib.rs @@ -765,8 +765,9 @@ impl serde::Deserialize for Complex where #[cfg(test)] fn hash(x: &T) -> u64 { - use std::hash::Hasher; - let mut hasher = hash::SipHasher::new(); + use std::hash::{BuildHasher, Hasher}; + use std::collections::hash_map::RandomState; + let mut hasher = ::Hasher::new(); x.hash(&mut hasher); hasher.finish() } diff --git a/rational/src/lib.rs b/rational/src/lib.rs index 7162202..e12b987 100644 --- a/rational/src/lib.rs +++ b/rational/src/lib.rs @@ -843,8 +843,9 @@ fn approximate_float_unsigned(val: F, max_error: F, max_iterations: usize) #[cfg(test)] fn hash(x: &T) -> u64 { - use std::hash::Hasher; - let mut hasher = hash::SipHasher::new(); + use std::hash::{BuildHasher, Hasher}; + use std::collections::hash_map::RandomState; + let mut hasher = ::Hasher::new(); x.hash(&mut hasher); hasher.finish() }