Remove indirection.

This commit is contained in:
Stephen Chung 2022-11-09 21:48:54 +08:00
parent 1b248b5af7
commit 3800a6d9f5

View File

@ -74,12 +74,12 @@ impl BuildHasher for StraightHasherBuilder {
}
/// Create an instance of the default hasher.
#[inline]
#[inline(always)]
#[must_use]
pub fn get_hasher() -> ahash::AHasher {
match config::hashing::get_ahash_seed() {
&Some([seed1, seed2, seed3, seed4]) if (seed1 | seed2 | seed3 | seed4) != 0 => {
ahash::RandomState::with_seeds(seed1, seed2, seed3, seed4).build_hasher()
Some([seed1, seed2, seed3, seed4]) if (seed1 | seed2 | seed3 | seed4) != 0 => {
ahash::RandomState::with_seeds(*seed1, *seed2, *seed3, *seed4).build_hasher()
}
_ => ahash::AHasher::default(),
}