Replace deprecated SipHasher.

This commit is contained in:
Patrick Jackson 2017-04-28 18:48:50 -07:00
parent e2ea246016
commit 71a15212a1
3 changed files with 3 additions and 3 deletions

View File

@ -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()
}

View File

@ -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()
}

View File

@ -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()
}