epaint/util/mod.rs
1/// Hash the given value with a predictable hasher.
2#[inline]
3pub fn hash(value: impl std::hash::Hash) -> u64 {
4 ahash::RandomState::with_seeds(1, 2, 3, 4).hash_one(value)
5}
6
7/// Hash the given value with the given hasher.
8#[inline]
9pub fn hash_with(value: impl std::hash::Hash, mut hasher: impl std::hash::Hasher) -> u64 {
10 value.hash(&mut hasher);
11 hasher.finish()
12}