Add IdSaltSet and IdSaltMap (#8590)

This commit is contained in:
Emil Ernerfeldt authored and GitHub committed 2026-09-18 10:29:36 +02:00
1 parent 5931e21d1f
commit 6bc0a82e21
2 files changed
+11 -1

No files matched your search

+10
View File
@@ -93,6 +93,16 @@ impl core::fmt::Debug for IdSalt {
}
}
// ----------------------------------------------------------------------------
/// `IdSaltSet` is a `HashSet<IdSalt>` optimized by knowing that [`IdSalt`] has good entropy, and doesn't need more hashing.
pub type IdSaltSet = nohash_hasher::IntSet<IdSalt>;
/// `IdSaltMap<V>` is a `HashMap<IdSalt, V>` optimized by knowing that [`IdSalt`] has good entropy, and doesn't need more hashing.
pub type IdSaltMap<V> = nohash_hasher::IntMap<IdSalt, V>;
// ----------------------------------------------------------------------------
/// In debug builds, remember the `Debug`-formatted source that produced each [`IdSalt`].
///
/// Used by [`IdSalt`]'s `Debug` impl so that `IdSalt::new("foo")` prints as
+1 -1
View File
@@ -484,7 +484,7 @@ pub use self::{
epaint::text::TextWrapMode,
grid::Grid,
id::{Id, IdMap, IdSet},
id_salt::{AsIdSalt, IdSalt},
id_salt::{AsIdSalt, IdSalt, IdSaltMap, IdSaltSet},
input_state::{InputOptions, InputState, MultiTouchInfo, PointerState, SurrenderFocusOn},
layers::{LayerId, Order},
layout::*,