Use ahash as default hasher.

This commit is contained in:
Stephen Chung
2021-01-15 23:52:56 +08:00
parent 1c7884f0d8
commit c4b6c31bf0
2 changed files with 2 additions and 14 deletions

View File

@@ -59,13 +59,7 @@ impl BuildHasher for StraightHasherBuilder {
/// Create an instance of the default hasher.
#[inline(always)]
pub fn get_hasher() -> impl Hasher {
#[cfg(feature = "no_std")]
let s: ahash::AHasher = Default::default();
// #[cfg(not(feature = "no_std"))]
// let s = crate::stdlib::collections::hash_map::DefaultHasher::new();
#[cfg(not(feature = "no_std"))]
let s: fxhash::FxHasher64 = Default::default();
s
}