mirror of
https://github.com/storytold/egui.git
synced 2026-11-24 03:22:06 +01:00
Add IdSaltSet and IdSaltMap (#8590)
This commit is contained in:
1 parent
5931e21d1f
commit
6bc0a82e21
2 files changed
+11
-1
No files matched your search
@@ -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
|
||||
|
||||
@@ -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::*,
|
||||
|
||||
Reference in new issue
Block a user