epaint/util/
mod.rs

1#[deprecated = "Use emath::OrderedFloat instead"]
2pub use emath::OrderedFloat;
3
4/// Hash the given value with a predictable hasher.
5#[inline]
6pub fn hash(value: impl std::hash::Hash) -> u64 {
7    ahash::RandomState::with_seeds(1, 2, 3, 4).hash_one(value)
8}
9
10/// Hash the given value with the given hasher.
11#[inline]
12pub fn hash_with(value: impl std::hash::Hash, mut hasher: impl std::hash::Hasher) -> u64 {
13    value.hash(&mut hasher);
14    hasher.finish()
15}