use RandomState::with_seeds replace AHasher::default (#2254)

* use `RandomState::with_seeds` replace `AHasher::default`

* remove history checkout

* update seeds to `1,2,3,4`
This commit is contained in:
axxop
2022-11-07 10:53:07 +01:00
committed by GitHub
parent 17501d7e3e
commit 940b896cbb
2 changed files with 6 additions and 8 deletions
+2 -4
View File
@@ -5,10 +5,8 @@ pub use ordered_float::*;
/// Hash the given value with a predictable hasher.
#[inline]
pub fn hash(value: impl std::hash::Hash) -> u64 {
use std::hash::Hasher as _;
let mut hasher = ahash::AHasher::default();
value.hash(&mut hasher);
hasher.finish()
use ahash::RandomState;
RandomState::with_seeds(1, 2, 3, 4).hash_one(value)
}
/// Hash the given value with the given hasher.