- Added
#[track_caller]
to functions that may panic. - Updated the
indexmap
dependency to version 2.7.1.
- Added methods
Entry::insert_entry
andVacantEntry::insert_entry
, returning anOccupiedEntry
after insertion. - Updated the
indexmap
dependency to version 2.7.0, indirectly updating tohashbrown
version 0.15 as well.
- Added an
insert_before
method toOrderMap
andOrderSet
, as an alternative toshift_insert
with different behavior on existing entries. - Added
first_entry
andlast_entry
methods toOrderMap
. - Added
From
implementations betweenIndexedEntry
andOccupiedEntry
.
- Added methods
OrderMap::append
andOrderSet::append
, moving all items from one map or set into another, and leaving the original capacity for reuse.
- Added trait
MutableEntryKey
for opt-in mutable access to map entry keys. - Added method
MutableKeys::iter_mut2
for opt-in mutable iteration of map keys and values.
- Reinstated
ordermap
as a crate that wrapsindexmap
with stronger ordering semantics. It does consider order forPartialEq
andEq
, also adding implementations ofPartialOrd
,Ord
, andHash
. Methods likeremove
use the semantics of indexmap'sshift_remove
.
- Inserted more deprecation information in the documentation. Note: the crate ordermap has been renamed with no change in functionality to indexmap; please use it under its new name.
- Renamed crate to
indexmap
; theordermap
crate is now deprecated and the typesOrderMap/Set
now have a deprecation notice.
-
This is the last release series for this
ordermap
under that name, because the crate is going to be renamed toindexmap
(with typesIndexMap
,IndexSet
) and no change in functionality! -
The map and its associated structs moved into the
map
submodule of the crate, so that the map and set are symmetric- The iterators,
Entry
and other structs are now underordermap::map::
- The iterators,
-
Internally refactored
OrderMap<K, V, S>
so that all the main algorithms (insertion, lookup, removal etc) that don't use theS
parameter (the hasher) are compiled without depending onS
, which reduces generics bloat. -
Entry<K, V>
no longer has a type parameterS
, which is just like the standardHashMap
's entry. -
Minimum Rust version requirement increased to Rust 1.18
- Documentation improvements
- The
.retain()
methods forOrderMap
andOrderSet
now traverse the elements in order, and the retained elements keep their order - Added new methods
.sort_by()
,.sort_keys()
toOrderMap
and.sort_by()
,.sort()
toOrderSet
. These methods allow you to sort the maps in place efficiently.
- Document insertion behaviour better by @lucab
- Updated dependences (no feature changes) by @ignatenkobrain
- Add
OrderSet
by @cuviper! OrderMap::drain
is now (too) a double ended iterator.
- In all ordermap iterators, forward the
collect
method to the underlying iterator as well. - Add crates.io categories.
- The methods
get_pair
,get_pair_index
were both replaced byget_full
(and the same for the mutable case). - Method
swap_remove_pair
replaced byswap_remove_full
. - Add trait
MutableKeys
for opt-in mutable key access. Mutable key access is only possible through the methods of this extension trait. - Add new trait
Equivalent
for key equivalence. This extends theBorrow
trait mechanism forOrderMap::get
in a backwards compatible way, just some minor type inference related issues may become apparent. See #10 for more information. - Implement
Extend<(&K, &V)>
by @xfix.
- Fix deserialization to support custom hashers by @Techcable.
- Add methods
.index()
on the entry types by @garro95.
- Add methods
.with_hasher()
,.hasher()
.
- Support
ExactSizeIterator
for the iterators. By @Binero. - Use
Box<[Pos]>
internally, saving a word in theOrderMap
struct. - Serde support, with crate feature
"serde-1"
. By @xfix.
- Add iterator
.drain(..)
by @stevej.
- Add method
.is_empty()
by @overvenus. - Implement
PartialEq, Eq
by @overvenus. - Add method
.sorted_by()
.
- Add iterators
.values()
and.values_mut()
. - Fix compatibility with 32-bit platforms.
- Add
.retain()
.
- Add
OccupiedEntry::remove_entry
and other minor entry methods, so that it now has all the features ofHashMap
's entries.
- Improved
.pop()
slightly.
- Improved performance of
.insert()
(#3) by @pczarn.
- Generalize
Entry
for now, so that it works on hashmaps with non-default hasher. However, there's a lingering compat issue since libstdHashMap
does not parameterize its entries by the hasher (S
typarm). - Special case some iterator methods like
.nth()
.
- Disable the verbose
Debug
impl by default.
- Fix doc links and clarify docs.
- Add more
HashMap
methods & compat with its API. - Experimental support for
.entry()
(the simplest parts of the API). - Add
.reserve()
(placeholder impl). - Add
.remove()
as synonym for.swap_remove()
. - Changed
.insert()
to swap value if the entry already exists, and returnOption
. - Experimental support as an indexed hash map! Added methods
.get_index()
,.get_index_mut()
,.swap_remove_index()
,.get_pair_index()
,.get_pair_index_mut()
.
- Implement the 32/32 split idea for
Pos
which improves cache utilization and lookup performance.
- Initial release.