| 1 | # Change Log |
| 2 | |
| 3 | All notable changes to this project will be documented in this file. |
| 4 | |
| 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/) |
| 6 | and this project adheres to [Semantic Versioning](https://semver.org/). |
| 7 | |
| 8 | ## [Unreleased] |
| 9 | |
| 10 | ## [v0.13.2] - 2023-01-12 |
| 11 | |
| 12 | ### Fixed |
| 13 | |
| 14 | - Added `#[inline(always)]` to `find_inner`. (#375) |
| 15 | - Fixed `RawTable::allocation_info` for empty tables. (#376) |
| 16 | |
| 17 | ## [v0.13.1] - 2022-11-10 |
| 18 | |
| 19 | ### Added |
| 20 | |
| 21 | - Added `Equivalent` trait to customize key lookups. (#350) |
| 22 | - Added support for 16-bit targets. (#368) |
| 23 | - Added `RawTable::allocation_info` which provides information about the memory |
| 24 | usage of a table. (#371) |
| 25 | |
| 26 | ### Changed |
| 27 | |
| 28 | - Bumped MSRV to 1.61.0. |
| 29 | - Upgraded to `ahash` 0.8. (#357) |
| 30 | - Make `with_hasher_in` const. (#355) |
| 31 | - The following methods have been removed from the `RawTable` API in favor of |
| 32 | safer alternatives: |
| 33 | - `RawTable::erase_no_drop` => Use `RawTable::erase` or `RawTable::remove` instead. |
| 34 | - `Bucket::read` => Use `RawTable::remove` instead. |
| 35 | - `Bucket::drop` => Use `RawTable::erase` instead. |
| 36 | - `Bucket::write` => Use `Bucket::as_mut` instead. |
| 37 | |
| 38 | ### Fixed |
| 39 | |
| 40 | - Ensure that `HashMap` allocations don't exceed `isize::MAX`. (#362) |
| 41 | - Fixed issue with field retagging in scopeguard. (#359) |
| 42 | |
| 43 | ## [v0.12.3] - 2022-07-17 |
| 44 | |
| 45 | ### Fixed |
| 46 | |
| 47 | - Fixed double-drop in `RawTable::clone_from`. (#348) |
| 48 | |
| 49 | ## [v0.12.2] - 2022-07-09 |
| 50 | |
| 51 | ### Added |
| 52 | |
| 53 | - Added `Entry` API for `HashSet`. (#342) |
| 54 | - Added `Extend<&'a (K, V)> for HashMap<K, V, S, A>`. (#340) |
| 55 | - Added length-based short-circuiting for hash table iteration. (#338) |
| 56 | - Added a function to access the `RawTable` of a `HashMap`. (#335) |
| 57 | |
| 58 | ### Changed |
| 59 | |
| 60 | - Edited `do_alloc` to reduce LLVM IR generated. (#341) |
| 61 | |
| 62 | ## [v0.12.1] - 2022-05-02 |
| 63 | |
| 64 | ### Fixed |
| 65 | |
| 66 | - Fixed underflow in `RawIterRange::size_hint`. (#325) |
| 67 | - Fixed the implementation of `Debug` for `ValuesMut` and `IntoValues`. (#325) |
| 68 | |
| 69 | ## [v0.12.0] - 2022-01-17 |
| 70 | |
| 71 | ### Added |
| 72 | |
| 73 | - Added `From<[T; N]>` and `From<[(K, V); N]>` for `HashSet` and `HashMap` respectively. (#297) |
| 74 | - Added an `allocator()` getter to HashMap and HashSet. (#257) |
| 75 | - Added `insert_unique_unchecked` to `HashMap` and `HashSet`. (#293) |
| 76 | - Added `into_keys` and `into_values` to HashMap. (#295) |
| 77 | - Implement `From<array>` on `HashSet` and `HashMap`. (#298) |
| 78 | - Added `entry_ref` API to `HashMap`. (#201) |
| 79 | |
| 80 | ### Changed |
| 81 | |
| 82 | - Bumped minimum Rust version to 1.56.1 and edition to 2021. |
| 83 | - Use u64 for the GroupWord on WebAssembly. (#271) |
| 84 | - Optimized `find`. (#279) |
| 85 | - Made rehashing and resizing less generic to reduce compilation time. (#282) |
| 86 | - Inlined small functions. (#283) |
| 87 | - Use `BuildHasher::hash_one` when `feature = "nightly"` is enabled. (#292) |
| 88 | - Relaxed the bounds on `Debug` for `HashSet`. (#296) |
| 89 | - Rename `get_each_mut` to `get_many_mut` and align API with the stdlib. (#291) |
| 90 | - Don't hash the key when searching in an empty table. (#305) |
| 91 | |
| 92 | ### Fixed |
| 93 | |
| 94 | - Guard against allocations exceeding isize::MAX. (#268) |
| 95 | - Made `RawTable::insert_no_grow` unsafe. (#254) |
| 96 | - Inline `static_empty`. (#280) |
| 97 | - Fixed trait bounds on Send/Sync impls. (#303) |
| 98 | |
| 99 | ## [v0.11.2] - 2021-03-25 |
| 100 | |
| 101 | ### Fixed |
| 102 | |
| 103 | - Added missing allocator type parameter to `HashMap`'s and `HashSet`'s `Clone` impls. (#252) |
| 104 | |
| 105 | ## [v0.11.1] - 2021-03-20 |
| 106 | |
| 107 | ### Fixed |
| 108 | |
| 109 | - Added missing `pub` modifier to `BumpWrapper`. (#251) |
| 110 | |
| 111 | ## [v0.11.0] - 2021-03-14 |
| 112 | |
| 113 | ### Added |
| 114 | - Added safe `try_insert_no_grow` method to `RawTable`. (#229) |
| 115 | - Added support for `bumpalo` as an allocator without the `nightly` feature. (#231) |
| 116 | - Implemented `Default` for `RawTable`. (#237) |
| 117 | - Added new safe methods `RawTable::get_each_mut`, `HashMap::get_each_mut`, and |
| 118 | `HashMap::get_each_key_value_mut`. (#239) |
| 119 | - Added `From<HashMap<T, ()>>` for `HashSet<T>`. (#235) |
| 120 | - Added `try_insert` method to `HashMap`. (#247) |
| 121 | |
| 122 | ### Changed |
| 123 | - The minimum Rust version has been bumped to 1.49.0. (#230) |
| 124 | - Significantly improved compilation times by reducing the amount of generated IR. (#205) |
| 125 | |
| 126 | ### Removed |
| 127 | - We no longer re-export the unstable allocator items from the standard library, nor the stable shims approximating the same. (#227) |
| 128 | - Removed hasher specialization support from `aHash`, which was resulting in inconsistent hashes being generated for a key. (#248) |
| 129 | |
| 130 | ### Fixed |
| 131 | - Fixed union length comparison. (#228) |
| 132 | |
| 133 | ## ~~[v0.10.0] - 2021-01-16~~ |
| 134 | |
| 135 | This release was _yanked_ due to inconsistent hashes being generated with the `nightly` feature. (#248) |
| 136 | |
| 137 | ### Changed |
| 138 | - Parametrized `RawTable`, `HashSet` and `HashMap` over an allocator. (#133) |
| 139 | - Improved branch prediction hints on stable. (#209) |
| 140 | - Optimized hashing of primitive types with AHash using specialization. (#207) |
| 141 | - Only instantiate `RawTable`'s reserve functions once per key-value. (#204) |
| 142 | |
| 143 | ## [v0.9.1] - 2020-09-28 |
| 144 | |
| 145 | ### Added |
| 146 | - Added safe methods to `RawTable` (#202): |
| 147 | - `get`: `find` and `as_ref` |
| 148 | - `get_mut`: `find` and `as_mut` |
| 149 | - `insert_entry`: `insert` and `as_mut` |
| 150 | - `remove_entry`: `find` and `remove` |
| 151 | - `erase_entry`: `find` and `erase` |
| 152 | |
| 153 | ### Changed |
| 154 | - Removed `from_key_hashed_nocheck`'s `Q: Hash`. (#200) |
| 155 | - Made `RawTable::drain` safe. (#201) |
| 156 | |
| 157 | ## [v0.9.0] - 2020-09-03 |
| 158 | |
| 159 | ### Fixed |
| 160 | - `drain_filter` now removes and yields items that do match the predicate, |
| 161 | rather than items that don't. This is a **breaking change** to match the |
| 162 | behavior of the `drain_filter` methods in `std`. (#187) |
| 163 | |
| 164 | ### Added |
| 165 | - Added `replace_entry_with` to `OccupiedEntry`, and `and_replace_entry_with` to `Entry`. (#190) |
| 166 | - Implemented `FusedIterator` and `size_hint` for `DrainFilter`. (#188) |
| 167 | |
| 168 | ### Changed |
| 169 | - The minimum Rust version has been bumped to 1.36 (due to `crossbeam` dependency). (#193) |
| 170 | - Updated `ahash` dependency to 0.4. (#198) |
| 171 | - `HashMap::with_hasher` and `HashSet::with_hasher` are now `const fn`. (#195) |
| 172 | - Removed `T: Hash + Eq` and `S: BuildHasher` bounds on `HashSet::new`, |
| 173 | `with_capacity`, `with_hasher`, and `with_capacity_and_hasher`. (#185) |
| 174 | |
| 175 | ## [v0.8.2] - 2020-08-08 |
| 176 | |
| 177 | ### Changed |
| 178 | - Avoid closures to improve compile times. (#183) |
| 179 | - Do not iterate to drop if empty. (#182) |
| 180 | |
| 181 | ## [v0.8.1] - 2020-07-16 |
| 182 | |
| 183 | ### Added |
| 184 | - Added `erase` and `remove` to `RawTable`. (#171) |
| 185 | - Added `try_with_capacity` to `RawTable`. (#174) |
| 186 | - Added methods that allow re-using a `RawIter` for `RawDrain`, |
| 187 | `RawIntoIter`, and `RawParIter`. (#175) |
| 188 | - Added `reflect_remove` and `reflect_insert` to `RawIter`. (#175) |
| 189 | - Added a `drain_filter` function to `HashSet`. (#179) |
| 190 | |
| 191 | ### Changed |
| 192 | - Deprecated `RawTable::erase_no_drop` in favor of `erase` and `remove`. (#176) |
| 193 | - `insert_no_grow` is now exposed under the `"raw"` feature. (#180) |
| 194 | |
| 195 | ## [v0.8.0] - 2020-06-18 |
| 196 | |
| 197 | ### Fixed |
| 198 | - Marked `RawTable::par_iter` as `unsafe`. (#157) |
| 199 | |
| 200 | ### Changed |
| 201 | - Reduced the size of `HashMap`. (#159) |
| 202 | - No longer create tables with a capacity of 1 element. (#162) |
| 203 | - Removed `K: Eq + Hash` bounds on `retain`. (#163) |
| 204 | - Pulled in `HashMap` changes from rust-lang/rust (#164): |
| 205 | - `extend_one` support on nightly. |
| 206 | - `CollectionAllocErr` renamed to `TryReserveError`. |
| 207 | - Added `HashSet::get_or_insert_owned`. |
| 208 | - `Default` for `HashSet` no longer requires `T: Eq + Hash` and `S: BuildHasher`. |
| 209 | |
| 210 | ## [v0.7.2] - 2020-04-27 |
| 211 | |
| 212 | ### Added |
| 213 | - Added `or_insert_with_key` to `Entry`. (#152) |
| 214 | |
| 215 | ### Fixed |
| 216 | - Partially reverted `Clone` optimization which was unsound. (#154) |
| 217 | |
| 218 | ### Changed |
| 219 | - Disabled use of `const-random` by default, which prevented reproducible builds. (#155) |
| 220 | - Optimized `repeat` function. (#150) |
| 221 | - Use `NonNull` for buckets, which improves codegen for iterators. (#148) |
| 222 | |
| 223 | ## [v0.7.1] - 2020-03-16 |
| 224 | |
| 225 | ### Added |
| 226 | - Added `HashMap::get_key_value_mut`. (#145) |
| 227 | |
| 228 | ### Changed |
| 229 | - Optimized `Clone` implementation. (#146) |
| 230 | |
| 231 | ## [v0.7.0] - 2020-01-31 |
| 232 | |
| 233 | ### Added |
| 234 | - Added a `drain_filter` function to `HashMap`. (#135) |
| 235 | |
| 236 | ### Changed |
| 237 | - Updated `ahash` dependency to 0.3. (#141) |
| 238 | - Optimized set union and intersection. (#130) |
| 239 | - `raw_entry` can now be used without requiring `S: BuildHasher`. (#123) |
| 240 | - `RawTable::bucket_index` can now be used under the `raw` feature. (#128) |
| 241 | |
| 242 | ## [v0.6.3] - 2019-10-31 |
| 243 | |
| 244 | ### Added |
| 245 | - Added an `ahash-compile-time-rng` feature (enabled by default) which allows disabling the |
| 246 | `compile-time-rng` feature in `ahash` to work around a Cargo bug. (#125) |
| 247 | |
| 248 | ## [v0.6.2] - 2019-10-23 |
| 249 | |
| 250 | ### Added |
| 251 | - Added an `inline-more` feature (enabled by default) which allows choosing a tradeoff between |
| 252 | runtime performance and compilation time. (#119) |
| 253 | |
| 254 | ## [v0.6.1] - 2019-10-04 |
| 255 | |
| 256 | ### Added |
| 257 | - Added `Entry::insert` and `RawEntryMut::insert`. (#118) |
| 258 | |
| 259 | ### Changed |
| 260 | - `Group::static_empty` was changed from a `const` to a `static` (#116). |
| 261 | |
| 262 | ## [v0.6.0] - 2019-08-13 |
| 263 | |
| 264 | ### Fixed |
| 265 | - Fixed AHash accidentally depending on `std`. (#110) |
| 266 | |
| 267 | ### Changed |
| 268 | - The minimum Rust version has been bumped to 1.32 (due to `rand` dependency). |
| 269 | |
| 270 | ## ~~[v0.5.1] - 2019-08-04~~ |
| 271 | |
| 272 | This release was _yanked_ due to a breaking change for users of `no-default-features`. |
| 273 | |
| 274 | ### Added |
| 275 | - The experimental and unsafe `RawTable` API is available under the "raw" feature. (#108) |
| 276 | - Added entry-like methods for `HashSet`. (#98) |
| 277 | |
| 278 | ### Changed |
| 279 | - Changed the default hasher from FxHash to AHash. (#97) |
| 280 | - `hashbrown` is now fully `no_std` on recent Rust versions (1.36+). (#96) |
| 281 | |
| 282 | ### Fixed |
| 283 | - We now avoid growing the table during insertions when it wasn't necessary. (#106) |
| 284 | - `RawOccupiedEntryMut` now properly implements `Send` and `Sync`. (#100) |
| 285 | - Relaxed `lazy_static` version. (#92) |
| 286 | |
| 287 | ## [v0.5.0] - 2019-06-12 |
| 288 | |
| 289 | ### Fixed |
| 290 | - Resize with a more conservative amount of space after deletions. (#86) |
| 291 | |
| 292 | ### Changed |
| 293 | - Exposed the Layout of the failed allocation in CollectionAllocErr::AllocErr. (#89) |
| 294 | |
| 295 | ## [v0.4.0] - 2019-05-30 |
| 296 | |
| 297 | ### Fixed |
| 298 | - Fixed `Send` trait bounds on `IterMut` not matching the libstd one. (#82) |
| 299 | |
| 300 | ## [v0.3.1] - 2019-05-30 |
| 301 | |
| 302 | ### Fixed |
| 303 | - Fixed incorrect use of slice in unsafe code. (#80) |
| 304 | |
| 305 | ## [v0.3.0] - 2019-04-23 |
| 306 | |
| 307 | ### Changed |
| 308 | - Changed shrink_to to not panic if min_capacity < capacity. (#67) |
| 309 | |
| 310 | ### Fixed |
| 311 | - Worked around emscripten bug emscripten-core/emscripten-fastcomp#258. (#66) |
| 312 | |
| 313 | ## [v0.2.2] - 2019-04-16 |
| 314 | |
| 315 | ### Fixed |
| 316 | - Inlined non-nightly lowest_set_bit_nonzero. (#64) |
| 317 | - Fixed build on latest nightly. (#65) |
| 318 | |
| 319 | ## [v0.2.1] - 2019-04-14 |
| 320 | |
| 321 | ### Changed |
| 322 | - Use for_each in map Extend and FromIterator. (#58) |
| 323 | - Improved worst-case performance of HashSet.is_subset. (#61) |
| 324 | |
| 325 | ### Fixed |
| 326 | - Removed incorrect debug_assert. (#60) |
| 327 | |
| 328 | ## [v0.2.0] - 2019-03-31 |
| 329 | |
| 330 | ### Changed |
| 331 | - The code has been updated to Rust 2018 edition. This means that the minimum |
| 332 | Rust version has been bumped to 1.31 (2018 edition). |
| 333 | |
| 334 | ### Added |
| 335 | - Added `insert_with_hasher` to the raw_entry API to allow `K: !(Hash + Eq)`. (#54) |
| 336 | - Added support for using hashbrown as the hash table implementation in libstd. (#46) |
| 337 | |
| 338 | ### Fixed |
| 339 | - Fixed cargo build with minimal-versions. (#45) |
| 340 | - Fixed `#[may_dangle]` attributes to match the libstd `HashMap`. (#46) |
| 341 | - ZST keys and values are now handled properly. (#46) |
| 342 | |
| 343 | ## [v0.1.8] - 2019-01-14 |
| 344 | |
| 345 | ### Added |
| 346 | - Rayon parallel iterator support (#37) |
| 347 | - `raw_entry` support (#31) |
| 348 | - `#[may_dangle]` on nightly (#31) |
| 349 | - `try_reserve` support (#31) |
| 350 | |
| 351 | ### Fixed |
| 352 | - Fixed variance on `IterMut`. (#31) |
| 353 | |
| 354 | ## [v0.1.7] - 2018-12-05 |
| 355 | |
| 356 | ### Fixed |
| 357 | - Fixed non-SSE version of convert_special_to_empty_and_full_to_deleted. (#32) |
| 358 | - Fixed overflow in rehash_in_place. (#33) |
| 359 | |
| 360 | ## [v0.1.6] - 2018-11-17 |
| 361 | |
| 362 | ### Fixed |
| 363 | - Fixed compile error on nightly. (#29) |
| 364 | |
| 365 | ## [v0.1.5] - 2018-11-08 |
| 366 | |
| 367 | ### Fixed |
| 368 | - Fixed subtraction overflow in generic::Group::match_byte. (#28) |
| 369 | |
| 370 | ## [v0.1.4] - 2018-11-04 |
| 371 | |
| 372 | ### Fixed |
| 373 | - Fixed a bug in the `erase_no_drop` implementation. (#26) |
| 374 | |
| 375 | ## [v0.1.3] - 2018-11-01 |
| 376 | |
| 377 | ### Added |
| 378 | - Serde support. (#14) |
| 379 | |
| 380 | ### Fixed |
| 381 | - Make the compiler inline functions more aggressively. (#20) |
| 382 | |
| 383 | ## [v0.1.2] - 2018-10-31 |
| 384 | |
| 385 | ### Fixed |
| 386 | - `clear` segfaults when called on an empty table. (#13) |
| 387 | |
| 388 | ## [v0.1.1] - 2018-10-30 |
| 389 | |
| 390 | ### Fixed |
| 391 | - `erase_no_drop` optimization not triggering in the SSE2 implementation. (#3) |
| 392 | - Missing `Send` and `Sync` for hash map and iterator types. (#7) |
| 393 | - Bug when inserting into a table smaller than the group width. (#5) |
| 394 | |
| 395 | ## v0.1.0 - 2018-10-29 |
| 396 | |
| 397 | - Initial release |
| 398 | |
| 399 | [Unreleased]: https://github.com/rust-lang/hashbrown/compare/v0.13.2...HEAD |
| 400 | [v0.13.2]: https://github.com/rust-lang/hashbrown/compare/v0.13.1...v0.13.2 |
| 401 | [v0.13.1]: https://github.com/rust-lang/hashbrown/compare/v0.12.3...v0.13.1 |
| 402 | [v0.12.3]: https://github.com/rust-lang/hashbrown/compare/v0.12.2...v0.12.3 |
| 403 | [v0.12.2]: https://github.com/rust-lang/hashbrown/compare/v0.12.1...v0.12.2 |
| 404 | [v0.12.1]: https://github.com/rust-lang/hashbrown/compare/v0.12.0...v0.12.1 |
| 405 | [v0.12.0]: https://github.com/rust-lang/hashbrown/compare/v0.11.2...v0.12.0 |
| 406 | [v0.11.2]: https://github.com/rust-lang/hashbrown/compare/v0.11.1...v0.11.2 |
| 407 | [v0.11.1]: https://github.com/rust-lang/hashbrown/compare/v0.11.0...v0.11.1 |
| 408 | [v0.11.0]: https://github.com/rust-lang/hashbrown/compare/v0.10.0...v0.11.0 |
| 409 | [v0.10.0]: https://github.com/rust-lang/hashbrown/compare/v0.9.1...v0.10.0 |
| 410 | [v0.9.1]: https://github.com/rust-lang/hashbrown/compare/v0.9.0...v0.9.1 |
| 411 | [v0.9.0]: https://github.com/rust-lang/hashbrown/compare/v0.8.2...v0.9.0 |
| 412 | [v0.8.2]: https://github.com/rust-lang/hashbrown/compare/v0.8.1...v0.8.2 |
| 413 | [v0.8.1]: https://github.com/rust-lang/hashbrown/compare/v0.8.0...v0.8.1 |
| 414 | [v0.8.0]: https://github.com/rust-lang/hashbrown/compare/v0.7.2...v0.8.0 |
| 415 | [v0.7.2]: https://github.com/rust-lang/hashbrown/compare/v0.7.1...v0.7.2 |
| 416 | [v0.7.1]: https://github.com/rust-lang/hashbrown/compare/v0.7.0...v0.7.1 |
| 417 | [v0.7.0]: https://github.com/rust-lang/hashbrown/compare/v0.6.3...v0.7.0 |
| 418 | [v0.6.3]: https://github.com/rust-lang/hashbrown/compare/v0.6.2...v0.6.3 |
| 419 | [v0.6.2]: https://github.com/rust-lang/hashbrown/compare/v0.6.1...v0.6.2 |
| 420 | [v0.6.1]: https://github.com/rust-lang/hashbrown/compare/v0.6.0...v0.6.1 |
| 421 | [v0.6.0]: https://github.com/rust-lang/hashbrown/compare/v0.5.1...v0.6.0 |
| 422 | [v0.5.1]: https://github.com/rust-lang/hashbrown/compare/v0.5.0...v0.5.1 |
| 423 | [v0.5.0]: https://github.com/rust-lang/hashbrown/compare/v0.4.0...v0.5.0 |
| 424 | [v0.4.0]: https://github.com/rust-lang/hashbrown/compare/v0.3.1...v0.4.0 |
| 425 | [v0.3.1]: https://github.com/rust-lang/hashbrown/compare/v0.3.0...v0.3.1 |
| 426 | [v0.3.0]: https://github.com/rust-lang/hashbrown/compare/v0.2.2...v0.3.0 |
| 427 | [v0.2.2]: https://github.com/rust-lang/hashbrown/compare/v0.2.1...v0.2.2 |
| 428 | [v0.2.1]: https://github.com/rust-lang/hashbrown/compare/v0.2.0...v0.2.1 |
| 429 | [v0.2.0]: https://github.com/rust-lang/hashbrown/compare/v0.1.8...v0.2.0 |
| 430 | [v0.1.8]: https://github.com/rust-lang/hashbrown/compare/v0.1.7...v0.1.8 |
| 431 | [v0.1.7]: https://github.com/rust-lang/hashbrown/compare/v0.1.6...v0.1.7 |
| 432 | [v0.1.6]: https://github.com/rust-lang/hashbrown/compare/v0.1.5...v0.1.6 |
| 433 | [v0.1.5]: https://github.com/rust-lang/hashbrown/compare/v0.1.4...v0.1.5 |
| 434 | [v0.1.4]: https://github.com/rust-lang/hashbrown/compare/v0.1.3...v0.1.4 |
| 435 | [v0.1.3]: https://github.com/rust-lang/hashbrown/compare/v0.1.2...v0.1.3 |
| 436 | [v0.1.2]: https://github.com/rust-lang/hashbrown/compare/v0.1.1...v0.1.2 |
| 437 | [v0.1.1]: https://github.com/rust-lang/hashbrown/compare/v0.1.0...v0.1.1 |