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