Replace deprecated SipHasher.
This commit is contained in:
parent
e2ea246016
commit
71a15212a1
|
@ -121,7 +121,7 @@ use std::hash;
|
|||
#[cfg(test)]
|
||||
fn hash<T: hash::Hash>(x: &T) -> u64 {
|
||||
use std::hash::Hasher;
|
||||
let mut hasher = hash::SipHasher::new();
|
||||
let mut hasher = std::collections::hash_map::DefaultHasher::new();
|
||||
x.hash(&mut hasher);
|
||||
hasher.finish()
|
||||
}
|
||||
|
|
|
@ -766,7 +766,7 @@ impl<T> serde::Deserialize for Complex<T> where
|
|||
#[cfg(test)]
|
||||
fn hash<T: hash::Hash>(x: &T) -> u64 {
|
||||
use std::hash::Hasher;
|
||||
let mut hasher = hash::SipHasher::new();
|
||||
let mut hasher = std::collections::hash_map::DefaultHasher::new();
|
||||
x.hash(&mut hasher);
|
||||
hasher.finish()
|
||||
}
|
||||
|
|
|
@ -671,7 +671,7 @@ impl RatioErrorKind {
|
|||
#[cfg(test)]
|
||||
fn hash<T: hash::Hash>(x: &T) -> u64 {
|
||||
use std::hash::Hasher;
|
||||
let mut hasher = hash::SipHasher::new();
|
||||
let mut hasher = std::collections::hash_map::DefaultHasher::new();
|
||||
x.hash(&mut hasher);
|
||||
hasher.finish()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue