1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00

Use ahash for Id and other things that need hashing

This commit is contained in:
Emil Ernerfeldt
2021-09-28 17:56:24 +02:00
parent f6fb4d942a
commit 2e83e36146
2 changed files with 5 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
/// Hash the given value with a predictable hasher.
#[inline]
pub fn hash(value: impl std::hash::Hash) -> u64 {
hash_with(value, std::collections::hash_map::DefaultHasher::default())
hash_with(value, ahash::AHasher::new_with_keys(123, 456))
}
/// Hash the given value with the given hasher.