| 1 | # Releases |
| 2 | |
| 3 | ## 2.13.0 (2026-01-07) |
| 4 | |
| 5 | - Implemented `Clone` for `IntoKeys` and `IntoValues`. |
| 6 | - Added `map::Slice::split_at_checked` and `split_at_mut_checked`. |
| 7 | - Added `set::Slice::split_at_checked`. |
| 8 | |
| 9 | ## 2.12.1 (2025-11-20) |
| 10 | |
| 11 | - Simplified a lot of internals using `hashbrown`'s new bucket API. |
| 12 | |
| 13 | ## 2.12.0 (2025-10-17) |
| 14 | |
| 15 | - **MSRV**: Rust 1.82.0 or later is now required. |
| 16 | - Updated the `hashbrown` dependency to 0.16 alone. |
| 17 | - Error types now implement `core::error::Error`. |
| 18 | - Added `pop_if` methods to `IndexMap` and `IndexSet`, similar to the |
| 19 | method for `Vec` added in Rust 1.86. |
| 20 | |
| 21 | ## 2.11.4 (2025-09-18) |
| 22 | |
| 23 | - Updated the `hashbrown` dependency to a range allowing 0.15 or 0.16. |
| 24 | |
| 25 | ## 2.11.3 (2025-09-15) |
| 26 | |
| 27 | - Make the minimum `serde` version only apply when "serde" is enabled. |
| 28 | |
| 29 | ## 2.11.2 (2025-09-15) |
| 30 | |
| 31 | - Switched the "serde" feature to depend on `serde_core`, improving build |
| 32 | parallelism in cases where other dependents have enabled "serde/derive". |
| 33 | |
| 34 | ## 2.11.1 (2025-09-08) |
| 35 | |
| 36 | - Added a `get_key_value_mut` method to `IndexMap`. |
| 37 | - Removed the unnecessary `Ord` bound on `insert_sorted_by` methods. |
| 38 | |
| 39 | ## 2.11.0 (2025-08-22) |
| 40 | |
| 41 | - Added `insert_sorted_by` and `insert_sorted_by_key` methods to `IndexMap`, |
| 42 | `IndexSet`, and `VacantEntry`, like customizable versions of `insert_sorted`. |
| 43 | - Added `is_sorted`, `is_sorted_by`, and `is_sorted_by_key` methods to |
| 44 | `IndexMap` and `IndexSet`, as well as their `Slice` counterparts. |
| 45 | - Added `sort_by_key` and `sort_unstable_by_key` methods to `IndexMap` and |
| 46 | `IndexSet`, as well as parallel counterparts. |
| 47 | - Added `replace_index` methods to `IndexMap`, `IndexSet`, and `VacantEntry` |
| 48 | to replace the key (or set value) at a given index. |
| 49 | - Added optional `sval` serialization support. |
| 50 | |
| 51 | ## 2.10.0 (2025-06-26) |
| 52 | |
| 53 | - Added `extract_if` methods to `IndexMap` and `IndexSet`, similar to the |
| 54 | methods for `HashMap` and `HashSet` with ranges like `Vec::extract_if`. |
| 55 | - Added more `#[track_caller]` annotations to functions that may panic. |
| 56 | |
| 57 | ## 2.9.0 (2025-04-04) |
| 58 | |
| 59 | - Added a `get_disjoint_mut` method to `IndexMap`, matching Rust 1.86's |
| 60 | `HashMap` method. |
| 61 | - Added a `get_disjoint_indices_mut` method to `IndexMap` and `map::Slice`, |
| 62 | matching Rust 1.86's `get_disjoint_mut` method on slices. |
| 63 | - Deprecated the `borsh` feature in favor of their own `indexmap` feature, |
| 64 | solving a cyclic dependency that occurred via `borsh-derive`. |
| 65 | |
| 66 | ## 2.8.0 (2025-03-10) |
| 67 | |
| 68 | - Added `indexmap_with_default!` and `indexset_with_default!` to be used with |
| 69 | alternative hashers, especially when using the crate without `std`. |
| 70 | - Implemented `PartialEq` between each `Slice` and `[]`/arrays. |
| 71 | - Removed the internal `rustc-rayon` feature and dependency. |
| 72 | |
| 73 | ## 2.7.1 (2025-01-19) |
| 74 | |
| 75 | - Added `#[track_caller]` to functions that may panic. |
| 76 | - Improved memory reservation for `insert_entry`. |
| 77 | |
| 78 | ## 2.7.0 (2024-11-30) |
| 79 | |
| 80 | - Added methods `Entry::insert_entry` and `VacantEntry::insert_entry`, returning |
| 81 | an `OccupiedEntry` after insertion. |
| 82 | |
| 83 | ## 2.6.0 (2024-10-01) |
| 84 | |
| 85 | - Implemented `Clone` for `map::IntoIter` and `set::IntoIter`. |
| 86 | - Updated the `hashbrown` dependency to version 0.15. |
| 87 | |
| 88 | ## 2.5.0 (2024-08-30) |
| 89 | |
| 90 | - Added an `insert_before` method to `IndexMap` and `IndexSet`, as an |
| 91 | alternative to `shift_insert` with different behavior on existing entries. |
| 92 | - Added `first_entry` and `last_entry` methods to `IndexMap`. |
| 93 | - Added `From` implementations between `IndexedEntry` and `OccupiedEntry`. |
| 94 | |
| 95 | ## 2.4.0 (2024-08-13) |
| 96 | |
| 97 | - Added methods `IndexMap::append` and `IndexSet::append`, moving all items from |
| 98 | one map or set into another, and leaving the original capacity for reuse. |
| 99 | |
| 100 | ## 2.3.0 (2024-07-31) |
| 101 | |
| 102 | - Added trait `MutableEntryKey` for opt-in mutable access to map entry keys. |
| 103 | - Added method `MutableKeys::iter_mut2` for opt-in mutable iteration of map |
| 104 | keys and values. |
| 105 | |
| 106 | ## 2.2.6 (2024-03-22) |
| 107 | |
| 108 | - Added trait `MutableValues` for opt-in mutable access to set values. |
| 109 | |
| 110 | ## 2.2.5 (2024-02-29) |
| 111 | |
| 112 | - Added optional `borsh` serialization support. |
| 113 | |
| 114 | ## 2.2.4 (2024-02-28) |
| 115 | |
| 116 | - Added an `insert_sorted` method on `IndexMap`, `IndexSet`, and `VacantEntry`. |
| 117 | - Avoid hashing for lookups in single-entry maps. |
| 118 | - Limit preallocated memory in `serde` deserializers. |
| 119 | |
| 120 | ## 2.2.3 (2024-02-11) |
| 121 | |
| 122 | - Added `move_index` and `swap_indices` methods to `IndexedEntry`, |
| 123 | `OccupiedEntry`, and `RawOccupiedEntryMut`, functioning like the existing |
| 124 | methods on `IndexMap`. |
| 125 | - Added `shift_insert` methods on `VacantEntry` and `RawVacantEntryMut`, as |
| 126 | well as `shift_insert_hashed_nocheck` on the latter, to insert the new entry |
| 127 | at a particular index. |
| 128 | - Added `shift_insert` methods on `IndexMap` and `IndexSet` to insert a new |
| 129 | entry at a particular index, or else move an existing entry there. |
| 130 | |
| 131 | ## 2.2.2 (2024-01-31) |
| 132 | |
| 133 | - Added indexing methods to raw entries: `RawEntryBuilder::from_hash_full`, |
| 134 | `RawEntryBuilder::index_from_hash`, and `RawEntryMut::index`. |
| 135 | |
| 136 | ## 2.2.1 (2024-01-28) |
| 137 | |
| 138 | - Corrected the signature of `RawOccupiedEntryMut::into_key(self) -> &'a mut K`, |
| 139 | This a breaking change from 2.2.0, but that version was published for less |
| 140 | than a day and has now been yanked. |
| 141 | |
| 142 | ## 2.2.0 (2024-01-28) |
| 143 | |
| 144 | - The new `IndexMap::get_index_entry` method finds an entry by its index for |
| 145 | in-place manipulation. |
| 146 | |
| 147 | - The `Keys` iterator now implements `Index<usize>` for quick access to the |
| 148 | entry's key, compared to indexing the map to get the value. |
| 149 | |
| 150 | - The new `IndexMap::splice` and `IndexSet::splice` methods will drain the |
| 151 | given range as an iterator, and then replace that range with entries from |
| 152 | an input iterator. |
| 153 | |
| 154 | - The new trait `RawEntryApiV1` offers opt-in access to a raw entry API for |
| 155 | `IndexMap`, corresponding to the unstable API on `HashSet` as of Rust 1.75. |
| 156 | |
| 157 | - Many `IndexMap` and `IndexSet` methods have relaxed their type constraints, |
| 158 | e.g. removing `K: Hash` on methods that don't actually need to hash. |
| 159 | |
| 160 | - Removal methods `remove`, `remove_entry`, and `take` are now deprecated |
| 161 | in favor of their `shift_` or `swap_` prefixed variants, which are more |
| 162 | explicit about their effect on the index and order of remaining items. |
| 163 | The deprecated methods will remain to guide drop-in replacements from |
| 164 | `HashMap` and `HashSet` toward the prefixed methods. |
| 165 | |
| 166 | ## 2.1.0 (2023-10-31) |
| 167 | |
| 168 | - Empty slices can now be created with `map::Slice::{new, new_mut}` and |
| 169 | `set::Slice::new`. In addition, `Slice::new`, `len`, and `is_empty` are |
| 170 | now `const` functions on both types. |
| 171 | |
| 172 | - `IndexMap`, `IndexSet`, and their respective `Slice`s all have binary |
| 173 | search methods for sorted data: map `binary_search_keys` and set |
| 174 | `binary_search` for plain comparison, `binary_search_by` for custom |
| 175 | comparators, `binary_search_by_key` for key extraction, and |
| 176 | `partition_point` for boolean conditions. |
| 177 | |
| 178 | ## 2.0.2 (2023-09-29) |
| 179 | |
| 180 | - The `hashbrown` dependency has been updated to version 0.14.1 to |
| 181 | complete the support for Rust 1.63. |
| 182 | |
| 183 | ## 2.0.1 (2023-09-27) |
| 184 | |
| 185 | - **MSRV**: Rust 1.63.0 is now supported as well, pending publication of |
| 186 | `hashbrown`'s relaxed MSRV (or use cargo `--ignore-rust-version`). |
| 187 | |
| 188 | ## 2.0.0 (2023-06-23) |
| 189 | |
| 190 | - **MSRV**: Rust 1.64.0 or later is now required. |
| 191 | |
| 192 | - The `"std"` feature is no longer auto-detected. It is included in the |
| 193 | default feature set, or else can be enabled like any other Cargo feature. |
| 194 | |
| 195 | - The `"serde-1"` feature has been removed, leaving just the optional |
| 196 | `"serde"` dependency to be enabled like a feature itself. |
| 197 | |
| 198 | - `IndexMap::get_index_mut` now returns `Option<(&K, &mut V)>`, changing |
| 199 | the key part from `&mut K` to `&K`. There is also a new alternative |
| 200 | `MutableKeys::get_index_mut2` to access the former behavior. |
| 201 | |
| 202 | - The new `map::Slice<K, V>` and `set::Slice<T>` offer a linear view of maps |
| 203 | and sets, behaving a lot like normal `[(K, V)]` and `[T]` slices. Notably, |
| 204 | comparison traits like `Eq` only consider items in order, rather than hash |
| 205 | lookups, and slices even implement `Hash`. |
| 206 | |
| 207 | - `IndexMap` and `IndexSet` now have `sort_by_cached_key` and |
| 208 | `par_sort_by_cached_key` methods which perform stable sorts in place |
| 209 | using a key extraction function. |
| 210 | |
| 211 | - `IndexMap` and `IndexSet` now have `reserve_exact`, `try_reserve`, and |
| 212 | `try_reserve_exact` methods that correspond to the same methods on `Vec`. |
| 213 | However, exactness only applies to the direct capacity for items, while the |
| 214 | raw hash table still follows its own rules for capacity and load factor. |
| 215 | |
| 216 | - The `Equivalent` trait is now re-exported from the `equivalent` crate, |
| 217 | intended as a common base to allow types to work with multiple map types. |
| 218 | |
| 219 | - The `hashbrown` dependency has been updated to version 0.14. |
| 220 | |
| 221 | - The `serde_seq` module has been moved from the crate root to below the |
| 222 | `map` module. |
| 223 | |
| 224 | ## 1.9.3 (2023-03-24) |
| 225 | |
| 226 | - Bump the `rustc-rayon` dependency, for compiler use only. |
| 227 | |
| 228 | ## 1.9.2 (2022-11-17) |
| 229 | |
| 230 | - `IndexMap` and `IndexSet` both implement `arbitrary::Arbitrary<'_>` and |
| 231 | `quickcheck::Arbitrary` if those optional dependency features are enabled. |
| 232 | |
| 233 | ## 1.9.1 (2022-06-21) |
| 234 | |
| 235 | - The MSRV now allows Rust 1.56.0 as well. However, currently `hashbrown` |
| 236 | 0.12.1 requires 1.56.1, so users on 1.56.0 should downgrade that to 0.12.0 |
| 237 | until there is a later published version relaxing its requirement. |
| 238 | |
| 239 | ## 1.9.0 (2022-06-16) |
| 240 | |
| 241 | - **MSRV**: Rust 1.56.1 or later is now required. |
| 242 | |
| 243 | - The `hashbrown` dependency has been updated to version 0.12. |
| 244 | |
| 245 | - `IterMut` and `ValuesMut` now implement `Debug`. |
| 246 | |
| 247 | - The new `IndexMap::shrink_to` and `IndexSet::shrink_to` methods shrink |
| 248 | the capacity with a lower bound. |
| 249 | |
| 250 | - The new `IndexMap::move_index` and `IndexSet::move_index` methods change |
| 251 | the position of an item from one index to another, shifting the items |
| 252 | between to accommodate the move. |
| 253 | |
| 254 | ## 1.8.2 (2022-05-27) |
| 255 | |
| 256 | - Bump the `rustc-rayon` dependency, for compiler use only. |
| 257 | |
| 258 | ## 1.8.1 (2022-03-29) |
| 259 | |
| 260 | - The new `IndexSet::replace_full` will return the index of the item along |
| 261 | with the replaced value, if any, by @zakcutner in PR [222]. |
| 262 | |
| 263 | [222]: https://github.com/indexmap-rs/indexmap/pull/222 |
| 264 | |
| 265 | ## 1.8.0 (2022-01-07) |
| 266 | |
| 267 | - The new `IndexMap::into_keys` and `IndexMap::into_values` will consume |
| 268 | the map into keys or values, respectively, matching Rust 1.54's `HashMap` |
| 269 | methods, by @taiki-e in PR [195]. |
| 270 | |
| 271 | - More of the iterator types implement `Debug`, `ExactSizeIterator`, and |
| 272 | `FusedIterator`, by @cuviper in PR [196]. |
| 273 | |
| 274 | - `IndexMap` and `IndexSet` now implement rayon's `ParallelDrainRange`, |
| 275 | by @cuviper in PR [197]. |
| 276 | |
| 277 | - `IndexMap::with_hasher` and `IndexSet::with_hasher` are now `const` |
| 278 | functions, allowing static maps and sets, by @mwillsey in PR [203]. |
| 279 | |
| 280 | - `IndexMap` and `IndexSet` now implement `From` for arrays, matching |
| 281 | Rust 1.56's implementation for `HashMap`, by @rouge8 in PR [205]. |
| 282 | |
| 283 | - `IndexMap` and `IndexSet` now have methods `sort_unstable_keys`, |
| 284 | `sort_unstable_by`, `sorted_unstable_by`, and `par_*` equivalents, |
| 285 | which sort in-place without preserving the order of equal items, by |
| 286 | @bhgomes in PR [211]. |
| 287 | |
| 288 | [195]: https://github.com/indexmap-rs/indexmap/pull/195 |
| 289 | [196]: https://github.com/indexmap-rs/indexmap/pull/196 |
| 290 | [197]: https://github.com/indexmap-rs/indexmap/pull/197 |
| 291 | [203]: https://github.com/indexmap-rs/indexmap/pull/203 |
| 292 | [205]: https://github.com/indexmap-rs/indexmap/pull/205 |
| 293 | [211]: https://github.com/indexmap-rs/indexmap/pull/211 |
| 294 | |
| 295 | ## 1.7.0 (2021-06-29) |
| 296 | |
| 297 | - **MSRV**: Rust 1.49 or later is now required. |
| 298 | |
| 299 | - The `hashbrown` dependency has been updated to version 0.11. |
| 300 | |
| 301 | ## 1.6.2 (2021-03-05) |
| 302 | |
| 303 | - Fixed to match `std` behavior, `OccupiedEntry::key` now references the |
| 304 | existing key in the map instead of the lookup key, by @cuviper in PR [170]. |
| 305 | |
| 306 | - The new `Entry::or_insert_with_key` matches Rust 1.50's `Entry` method, |
| 307 | passing `&K` to the callback to create a value, by @cuviper in PR [175]. |
| 308 | |
| 309 | [170]: https://github.com/indexmap-rs/indexmap/pull/170 |
| 310 | [175]: https://github.com/indexmap-rs/indexmap/pull/175 |
| 311 | |
| 312 | ## 1.6.1 (2020-12-14) |
| 313 | |
| 314 | - The new `serde_seq` module implements `IndexMap` serialization as a |
| 315 | sequence to ensure order is preserved, by @cuviper in PR [158]. |
| 316 | |
| 317 | - New methods on maps and sets work like the `Vec`/slice methods by the same name: |
| 318 | `truncate`, `split_off`, `first`, `first_mut`, `last`, `last_mut`, and |
| 319 | `swap_indices`, by @cuviper in PR [160]. |
| 320 | |
| 321 | [158]: https://github.com/indexmap-rs/indexmap/pull/158 |
| 322 | [160]: https://github.com/indexmap-rs/indexmap/pull/160 |
| 323 | |
| 324 | ## 1.6.0 (2020-09-05) |
| 325 | |
| 326 | - **MSRV**: Rust 1.36 or later is now required. |
| 327 | |
| 328 | - The `hashbrown` dependency has been updated to version 0.9. |
| 329 | |
| 330 | ## 1.5.2 (2020-09-01) |
| 331 | |
| 332 | - The new "std" feature will force the use of `std` for users that explicitly |
| 333 | want the default `S = RandomState`, bypassing the autodetection added in 1.3.0, |
| 334 | by @cuviper in PR [145]. |
| 335 | |
| 336 | [145]: https://github.com/indexmap-rs/indexmap/pull/145 |
| 337 | |
| 338 | ## 1.5.1 (2020-08-07) |
| 339 | |
| 340 | - Values can now be indexed by their `usize` position by @cuviper in PR [132]. |
| 341 | |
| 342 | - Some of the generic bounds have been relaxed to match `std` by @cuviper in PR [141]. |
| 343 | |
| 344 | - `drain` now accepts any `R: RangeBounds<usize>` by @cuviper in PR [142]. |
| 345 | |
| 346 | [132]: https://github.com/indexmap-rs/indexmap/pull/132 |
| 347 | [141]: https://github.com/indexmap-rs/indexmap/pull/141 |
| 348 | [142]: https://github.com/indexmap-rs/indexmap/pull/142 |
| 349 | |
| 350 | ## 1.5.0 (2020-07-17) |
| 351 | |
| 352 | - **MSRV**: Rust 1.32 or later is now required. |
| 353 | |
| 354 | - The inner hash table is now based on `hashbrown` by @cuviper in PR [131]. |
| 355 | This also completes the method `reserve` and adds `shrink_to_fit`. |
| 356 | |
| 357 | - Add new methods `get_key_value`, `remove_entry`, `swap_remove_entry`, |
| 358 | and `shift_remove_entry`, by @cuviper in PR [136] |
| 359 | |
| 360 | - `Clone::clone_from` reuses allocations by @cuviper in PR [125] |
| 361 | |
| 362 | - Add new method `reverse` by @linclelinkpart5 in PR [128] |
| 363 | |
| 364 | [125]: https://github.com/indexmap-rs/indexmap/pull/125 |
| 365 | [128]: https://github.com/indexmap-rs/indexmap/pull/128 |
| 366 | [131]: https://github.com/indexmap-rs/indexmap/pull/131 |
| 367 | [136]: https://github.com/indexmap-rs/indexmap/pull/136 |
| 368 | |
| 369 | ## 1.4.0 (2020-06-01) |
| 370 | |
| 371 | - Add new method `get_index_of` by @Thermatrix in PR [115] and [120] |
| 372 | |
| 373 | - Fix build script rebuild-if-changed configuration to use "build.rs"; |
| 374 | fixes issue [123]. Fix by @cuviper. |
| 375 | |
| 376 | - Dev-dependencies (rand and quickcheck) have been updated. The crate's tests |
| 377 | now run using Rust 1.32 or later (MSRV for building the crate has not changed). |
| 378 | by @kjeremy and @bluss |
| 379 | |
| 380 | [123]: https://github.com/indexmap-rs/indexmap/issues/123 |
| 381 | [115]: https://github.com/indexmap-rs/indexmap/pull/115 |
| 382 | [120]: https://github.com/indexmap-rs/indexmap/pull/120 |
| 383 | |
| 384 | ## 1.3.2 (2020-02-05) |
| 385 | |
| 386 | - Maintenance update to regenerate the published `Cargo.toml`. |
| 387 | |
| 388 | ## 1.3.1 (2020-01-15) |
| 389 | |
| 390 | - Maintenance update for formatting and `autocfg` 1.0. |
| 391 | |
| 392 | ## 1.3.0 (2019-10-18) |
| 393 | |
| 394 | - The deprecation messages in the previous version have been removed. |
| 395 | (The methods have not otherwise changed.) Docs for removal methods have been |
| 396 | improved. |
| 397 | - From Rust 1.36, this crate supports being built **without std**, requiring |
| 398 | `alloc` instead. This is enabled automatically when it is detected that |
| 399 | `std` is not available. There is no crate feature to enable/disable to |
| 400 | trigger this. The new build-dep `autocfg` enables this. |
| 401 | |
| 402 | ## 1.2.0 (2019-09-08) |
| 403 | |
| 404 | - Plain `.remove()` now has a deprecation message, it informs the user |
| 405 | about picking one of the removal functions `swap_remove` and `shift_remove` |
| 406 | which have different performance and order semantics. |
| 407 | Plain `.remove()` will not be removed, the warning message and method |
| 408 | will remain until further. |
| 409 | |
| 410 | - Add new method `shift_remove` for order preserving removal on the map, |
| 411 | and `shift_take` for the corresponding operation on the set. |
| 412 | |
| 413 | - Add methods `swap_remove`, `swap_remove_entry` to `Entry`. |
| 414 | |
| 415 | - Fix indexset/indexmap to support full paths, like `indexmap::indexmap!()` |
| 416 | |
| 417 | - Internal improvements: fix warnings, deprecations and style lints |
| 418 | |
| 419 | ## 1.1.0 (2019-08-20) |
| 420 | |
| 421 | - Added optional feature `"rayon"` that adds parallel iterator support |
| 422 | to `IndexMap` and `IndexSet` using Rayon. This includes all the regular |
| 423 | iterators in parallel versions, and parallel sort. |
| 424 | |
| 425 | - Implemented `Clone` for `map::{Iter, Keys, Values}` and |
| 426 | `set::{Difference, Intersection, Iter, SymmetricDifference, Union}` |
| 427 | |
| 428 | - Implemented `Debug` for `map::{Entry, IntoIter, Iter, Keys, Values}` and |
| 429 | `set::{Difference, Intersection, IntoIter, Iter, SymmetricDifference, Union}` |
| 430 | |
| 431 | - Serde trait `IntoDeserializer` are implemented for `IndexMap` and `IndexSet`. |
| 432 | |
| 433 | - Minimum Rust version requirement increased to Rust 1.30 for development builds. |
| 434 | |
| 435 | ## 1.0.2 (2018-10-22) |
| 436 | |
| 437 | - The new methods `IndexMap::insert_full` and `IndexSet::insert_full` are |
| 438 | both like `insert` with the index included in the return value. |
| 439 | |
| 440 | - The new method `Entry::and_modify` can be used to modify occupied |
| 441 | entries, matching the new methods of `std` maps in Rust 1.26. |
| 442 | |
| 443 | - The new method `Entry::or_default` inserts a default value in unoccupied |
| 444 | entries, matching the new methods of `std` maps in Rust 1.28. |
| 445 | |
| 446 | ## 1.0.1 (2018-03-24) |
| 447 | |
| 448 | - Document Rust version policy for the crate (see rustdoc) |
| 449 | |
| 450 | ## 1.0.0 (2018-03-11) |
| 451 | |
| 452 | - This is the 1.0 release for `indexmap`! (the crate and datastructure |
| 453 | formerly known as “ordermap”) |
| 454 | - `OccupiedEntry::insert` changed its signature, to use `&mut self` for |
| 455 | the method receiver, matching the equivalent method for a standard |
| 456 | `HashMap`. Thanks to @dtolnay for finding this bug. |
| 457 | - The deprecated old names from ordermap were removed: `OrderMap`, |
| 458 | `OrderSet`, `ordermap!{}`, `orderset!{}`. Use the new `IndexMap` |
| 459 | etc names instead. |
| 460 | |
| 461 | ## 0.4.1 (2018-02-14) |
| 462 | |
| 463 | - Renamed crate to `indexmap`; the `ordermap` crate is now deprecated |
| 464 | and the types `OrderMap/Set` now have a deprecation notice. |
| 465 | |
| 466 | ## 0.4.0 (2018-02-02) |
| 467 | |
| 468 | - This is the last release series for this `ordermap` under that name, |
| 469 | because the crate is **going to be renamed** to `indexmap` (with types |
| 470 | `IndexMap`, `IndexSet`) and no change in functionality! |
| 471 | - The map and its associated structs moved into the `map` submodule of the |
| 472 | crate, so that the map and set are symmetric |
| 473 | |
| 474 | + The iterators, `Entry` and other structs are now under `ordermap::map::` |
| 475 | |
| 476 | - Internally refactored `OrderMap<K, V, S>` so that all the main algorithms |
| 477 | (insertion, lookup, removal etc) that don't use the `S` parameter (the |
| 478 | hasher) are compiled without depending on `S`, which reduces generics bloat. |
| 479 | |
| 480 | - `Entry<K, V>` no longer has a type parameter `S`, which is just like |
| 481 | the standard `HashMap`'s entry. |
| 482 | |
| 483 | - Minimum Rust version requirement increased to Rust 1.18 |
| 484 | |
| 485 | ## 0.3.5 (2018-01-14) |
| 486 | |
| 487 | - Documentation improvements |
| 488 | |
| 489 | ## 0.3.4 (2018-01-04) |
| 490 | |
| 491 | - The `.retain()` methods for `OrderMap` and `OrderSet` now |
| 492 | traverse the elements in order, and the retained elements **keep their order** |
| 493 | - Added new methods `.sort_by()`, `.sort_keys()` to `OrderMap` and |
| 494 | `.sort_by()`, `.sort()` to `OrderSet`. These methods allow you to |
| 495 | sort the maps in place efficiently. |
| 496 | |
| 497 | ## 0.3.3 (2017-12-28) |
| 498 | |
| 499 | - Document insertion behaviour better by @lucab |
| 500 | - Updated dependences (no feature changes) by @ignatenkobrain |
| 501 | |
| 502 | ## 0.3.2 (2017-11-25) |
| 503 | |
| 504 | - Add `OrderSet` by @cuviper! |
| 505 | - `OrderMap::drain` is now (too) a double ended iterator. |
| 506 | |
| 507 | ## 0.3.1 (2017-11-19) |
| 508 | |
| 509 | - In all ordermap iterators, forward the `collect` method to the underlying |
| 510 | iterator as well. |
| 511 | - Add crates.io categories. |
| 512 | |
| 513 | ## 0.3.0 (2017-10-07) |
| 514 | |
| 515 | - The methods `get_pair`, `get_pair_index` were both replaced by |
| 516 | `get_full` (and the same for the mutable case). |
| 517 | - Method `swap_remove_pair` replaced by `swap_remove_full`. |
| 518 | - Add trait `MutableKeys` for opt-in mutable key access. Mutable key access |
| 519 | is only possible through the methods of this extension trait. |
| 520 | - Add new trait `Equivalent` for key equivalence. This extends the |
| 521 | `Borrow` trait mechanism for `OrderMap::get` in a backwards compatible |
| 522 | way, just some minor type inference related issues may become apparent. |
| 523 | See [#10] for more information. |
| 524 | - Implement `Extend<(&K, &V)>` by @xfix. |
| 525 | |
| 526 | [#10]: https://github.com/indexmap-rs/indexmap/pull/10 |
| 527 | |
| 528 | ## 0.2.13 (2017-09-30) |
| 529 | |
| 530 | - Fix deserialization to support custom hashers by @Techcable. |
| 531 | - Add methods `.index()` on the entry types by @garro95. |
| 532 | |
| 533 | ## 0.2.12 (2017-09-11) |
| 534 | |
| 535 | - Add methods `.with_hasher()`, `.hasher()`. |
| 536 | |
| 537 | ## 0.2.11 (2017-08-29) |
| 538 | |
| 539 | - Support `ExactSizeIterator` for the iterators. By @Binero. |
| 540 | - Use `Box<[Pos]>` internally, saving a word in the `OrderMap` struct. |
| 541 | - Serde support, with crate feature `"serde-1"`. By @xfix. |
| 542 | |
| 543 | ## 0.2.10 (2017-04-29) |
| 544 | |
| 545 | - Add iterator `.drain(..)` by @stevej. |
| 546 | |
| 547 | ## 0.2.9 (2017-03-26) |
| 548 | |
| 549 | - Add method `.is_empty()` by @overvenus. |
| 550 | - Implement `PartialEq, Eq` by @overvenus. |
| 551 | - Add method `.sorted_by()`. |
| 552 | |
| 553 | ## 0.2.8 (2017-03-01) |
| 554 | |
| 555 | - Add iterators `.values()` and `.values_mut()`. |
| 556 | - Fix compatibility with 32-bit platforms. |
| 557 | |
| 558 | ## 0.2.7 (2016-11-02) |
| 559 | |
| 560 | - Add `.retain()`. |
| 561 | |
| 562 | ## 0.2.6 (2016-11-02) |
| 563 | |
| 564 | - Add `OccupiedEntry::remove_entry` and other minor entry methods, |
| 565 | so that it now has all the features of `HashMap`'s entries. |
| 566 | |
| 567 | ## 0.2.5 (2016-10-31) |
| 568 | |
| 569 | - Improved `.pop()` slightly. |
| 570 | |
| 571 | ## 0.2.4 (2016-10-22) |
| 572 | |
| 573 | - Improved performance of `.insert()` ([#3]) by @pczarn. |
| 574 | |
| 575 | [#3]: https://github.com/indexmap-rs/indexmap/pull/3 |
| 576 | |
| 577 | ## 0.2.3 (2016-10-11) |
| 578 | |
| 579 | - Generalize `Entry` for now, so that it works on hashmaps with non-default |
| 580 | hasher. However, there's a lingering compat issue since libstd `HashMap` |
| 581 | does not parameterize its entries by the hasher (`S` typarm). |
| 582 | - Special case some iterator methods like `.nth()`. |
| 583 | |
| 584 | ## 0.2.2 (2016-10-02) |
| 585 | |
| 586 | - Disable the verbose `Debug` impl by default. |
| 587 | |
| 588 | ## 0.2.1 (2016-10-02) |
| 589 | |
| 590 | - Fix doc links and clarify docs. |
| 591 | |
| 592 | ## 0.2.0 (2016-10-01) |
| 593 | |
| 594 | - Add more `HashMap` methods & compat with its API. |
| 595 | - Experimental support for `.entry()` (the simplest parts of the API). |
| 596 | - Add `.reserve()` (placeholder impl). |
| 597 | - Add `.remove()` as synonym for `.swap_remove()`. |
| 598 | - Changed `.insert()` to swap value if the entry already exists, and |
| 599 | return `Option`. |
| 600 | - Experimental support as an *indexed* hash map! Added methods |
| 601 | `.get_index()`, `.get_index_mut()`, `.swap_remove_index()`, |
| 602 | `.get_pair_index()`, `.get_pair_index_mut()`. |
| 603 | |
| 604 | ## 0.1.2 (2016-09-19) |
| 605 | |
| 606 | - Implement the 32/32 split idea for `Pos` which improves cache utilization |
| 607 | and lookup performance. |
| 608 | |
| 609 | ## 0.1.1 (2016-09-16) |
| 610 | |
| 611 | - Initial release. |