Releases: oxidecomputer/iddqd
Releases · oxidecomputer/iddqd
iddqd 0.3.18
Fixed
- Fixed a rehashing bug in hash map reserve and shrink-to-fit methods. (Due to an oversight, these methods were previously not part of our property-based tests. Now they are. Sorry about that!)
iddqd 0.3.17
Added
- Capacity management methods for all map types:
reserve(&mut self, additional: usize)reserves capacity for at leastadditionalmore elements.shrink_to_fit(&mut self)shrinks capacity to fit the current length.shrink_to(&mut self, min_capacity: usize)shrinks capacity to at leastmin_capacity.try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>: fallible capacity reservation for hash maps (IdHashMap,BiHashMap,TriHashMap).
- New
TryReserveErrortype in theerrorsmodule for reporting allocation failures.
Notes
- For
IdOrdMap, the reserve and shrink methods only affect item storage. The internalBTreeSetused for item ordering does not support capacity control. IdOrdMapdoes not providetry_reserve, since the underlyingBTreeSetdoes not expose fallible reservation operations.
Fixed
- Fixed an instance of potential unsoundness in
retain.
Changed
The Extend implementations now pre-reserve capacity based on the iterator's size_hint.
iddqd 0.3.16
Added
clearmethods for all map types to remove all items from the map.- Optionally, serialize ID maps as maps (JSON objects) rather than sequences (JSON arrays):
- New
IdHashMapAsMap,BiHashMapAsMap,TriHashMapAsMap, andIdOrdMapAsMapmarker types to use with#[serde(with = ...)]. - The default deserializer for each map now accepts both maps and sequences.
- New
Changed
- Documentation improvements for serde implementations.
iddqd 0.3.15
Added
retainmethods that allow filtering items in place based on a predicate.IdOrdMap::first,first_entry,last,last_entry,pop_first, andpop_lastmethods for accessing entries at the beginning and end of the map.BiHashMap::with_hasherandTriHashMap::with_hasherare nowconst fn.
Changed
- Reduced memory footprint for
BiHashMapandTriHashMap.
iddqd 0.3.14
Fixed
Replaced obsolete doc_auto_cfg with doc_cfg, to fix Rust nightly builds with the doc_cfg flag enabled.
iddqd 0.3.13
Changed
- iddqd now depends on
serde_corerather thanserde. This allows iddqd's compilation to be parallelized withserde_derive. - Internal dependency updates:
foldhashupdated to 0.2, andhashbrownupdated to 0.16.
iddqd 0.3.12
Added
The following methods are now const fn:
IdOrdMap::newIdHashMap::with_hasher
iddqd 0.3.11
Fixed
The type definitions for IdHashMap, BiHashMap, TriHashMap, and IdOrdMap no longer require IdHashItem, BiHashItem, TriHashItem, and IdOrdItem, respectively. This matches the standard library's HashMap and BTreeMap type definitions which don't require Hash + Eq or Ord bounds.
Thanks to aatifsyed for your first contribution!
iddqd 0.3.10
Fixed
id_ord_map::RefMut's reborrow method now works if the underlying IdOrdItem is non-'static.
iddqd 0.3.9
Added
- For the optional
daftfeature, the mapDifftypes now implementfmt::Debug.
Miscellaneous
- Several documentation fixes.