mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user