Skip to content

Commit d84bf5e

Browse files
committed
Release 2.2.0
1 parent 9edb1a4 commit d84bf5e

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "indexmap"
33
edition = "2021"
4-
version = "2.1.0"
4+
version = "2.2.0"
55
documentation = "https://docs.rs/indexmap/"
66
repository = "https://github.com/indexmap-rs/indexmap"
77
license = "Apache-2.0 OR MIT"

RELEASES.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
- 2.2.0
2+
3+
- The new `IndexMap::get_index_entry` method finds an entry by its index for
4+
in-place manipulation.
5+
6+
- The `Keys` iterator now implements `Index<usize>` for quick access to the
7+
entry's key, compared to indexing the map to get the value.
8+
9+
- The new `IndexMap::splice` and `IndexSet::splice` methods will drain the
10+
given range as an iterator, and then replace that range with entries from
11+
an input iterator.
12+
13+
- The new trait `RawEntryApiV1` offers opt-in access to a raw entry API for
14+
`IndexMap`, corresponding to the unstable API on `HashSet` as of Rust 1.75.
15+
16+
- Many `IndexMap` and `IndexSet` methods have relaxed their type constraints,
17+
e.g. removing `K: Hash` on methods that don't actually need to hash.
18+
19+
- Removal methods `remove`, `remove_entry`, and `take` are now deprecated
20+
in favor of their `shift_` or `swap_` prefixed variants, which are more
21+
explicit about their effect on the index and order of remaining items.
22+
The deprecated methods will remain to guide drop-in replacements from
23+
`HashMap` and `HashSet` toward the prefixed methods.
24+
125
- 2.1.0
226

327
- Empty slices can now be created with `map::Slice::{new, new_mut}` and
@@ -6,7 +30,7 @@
630

731
- `IndexMap`, `IndexSet`, and their respective `Slice`s all have binary
832
search methods for sorted data: map `binary_search_keys` and set
9-
`binary_search` for plain comparision, `binary_search_by` for custom
33+
`binary_search` for plain comparison, `binary_search_by` for custom
1034
comparators, `binary_search_by_key` for key extraction, and
1135
`partition_point` for boolean conditions.
1236

0 commit comments

Comments
 (0)