-
Massive rework, with a focus on secondary maps and custom keys to prevent cross-slotmap key usage.
-
Removed
DenseSlotMap
in favour ofHopSlotMap
as the latter performs better when secondary maps are in use. -
Unfortunately due to the redesign the first slot in a slot map must now always be empty. This means some deserializations of slot maps serialized with a version before 0.3.0 can fail.
-
Added
SecondaryMap
andSparseSecondaryMap
, which allows you to associate extra data with keys given by a slot map. -
Added
DefaultKey
, custom key types, and support for them on all slot maps and secondary maps. You must now always specify the key type you're using with a slot map, soSlotMap<i32>
would beSlotMap<DefaultKey, i32>
. It is recommended to make a custom key type withnew_key_type!
for any slot map you create, as this entirely prevents using the wrong key on the wrong slot map. -
KeyData
now hasas_ffi
andfrom_ffi
functions that convert the data that makes up a key to/from anu64
. This allows you to use slot map keys as opaque handles in FFI code.
-
Fixed a potential uninitialized memory vulnerability. No uninitialized memory was read or used directly, but Rust's assumptions could lead to it. Yanked all previous versions as they were all vulnerable.
-
Made a
Key
member non-zero so thatOption<Key>
is optimized.
Start of version history.