Debian Codegraph @

third_party/rust/indexmap/RELEASES.md

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