# Changelog
## Version 2
2.2.5
* `Hash*::with_hasher` is now a const function: by [Daniel-Aaron-Bloom](https://github.com/Daniel-Aaron-Bloom).
* Fix the `HashMap::upsert` document: by [dfaust](https://github.com/dfaust).
2.2.4
* Minor `Hash*` performance optimization.
2.2.3
* Minor `Hash*` memory optimization.
2.2.2
* Fix a data race between `TreeIndex::clear` and `TreeIndex::insert`.
* Update internal doc.
2.2.1
* Fix a minor Miri specific assertion failure.
2.2.0
* Add `Comparable` and `Equivalent` traits: [#162](https://github.com/wvwwvwwv/scalable-concurrent-containers/issues/162) by [qthree](https://github.com/qthree).
2.1.18
* Add `TreeIndex::peek_entry`: [#157](https://github.com/wvwwvwwv/scalable-concurrent-containers/issues/157) by [qthree](https://github.com/qthree).
* `tree_index::Range` accepts borrowed key ranges: [#158](https://github.com/wvwwvwwv/scalable-concurrent-containers/issues/158) by [qthree](https://github.com/qthree).
2.1.17
* Optimize `TreeIndex::{clear, drop}`: [#156](https://github.com/wvwwvwwv/scalable-concurrent-containers/issues/156).
2.1.16
* Fix potential data races in `HashMap` and `TreeIndex`.
2.1.15
* Add `upsert` to `HashMap`.
2.1.14
* Fix theoretical data race issues in `TreeIndex`: replace dependent loads with load-acquires.
2.1.13
* Fix a data race in `TreeIndex::insert*`.
2.1.12
* Bump `SDD` to `3.0`.
* Update doc to clearly state that `Hash*::get*` owns the entry for modification, and recommend `Hash*::read*` for read-only access.
2.1.11
* Activate Miri tests: [#88](https://github.com/wvwwvwwv/scalable-concurrent-containers/issues/88).
2.1.10
* Add `loom` support.
* Fix data races in `TreeIndex`: [#153](https://github.com/wvwwvwwv/scalable-concurrent-containers/issues/153).
2.1.9
* Fix a correctness issue with `Stack`, `Queue`, and `Bag::pop`: [#153](https://github.com/wvwwvwwv/scalable-concurrent-containers/issues/153).
2.1.8
* Fix a correctness issue with `TreeIndex::remove_range`: [#153](https://github.com/wvwwvwwv/scalable-concurrent-containers/issues/153).
* Add `TreeIndex::remove_range_async`: [#123](https://github.com/wvwwvwwv/scalable-concurrent-containers/issues/123).
2.1.7
* Fix a correctness issue with `HashMap` on a 32-bit CPU: [#153](https://github.com/wvwwvwwv/scalable-concurrent-containers/issues/153).
2.1.6
* Minor optimization: bump `SDD` to `2.1.0`.
2.1.5
* Optimize `LinkedList` deleted node reclamation.
* Optimize `Bag` by not allowing pushed instances to be dropped without being used.
2.1.4
* Implement more aggressive entry removal in `HashIndex` ([#150](https://github.com/wvwwvwwv/scalable-concurrent-containers/issues/150)).
2.1.3
* Update [`sdd`](https://crates.io/crates/sdd).
2.1.2
* Implement `any_entry` and `any_entry_async` to `HashMap` and `HashIndex` ([#148](https://github.com/wvwwvwwv/scalable-concurrent-containers/issues/148)).
2.1.1
* Implement `Deref` and `DerefMut` for `OccupiedEntry`: [#140](https://github.com/wvwwvwwv/scalable-concurrent-containers/issues/140) by [gituser-rs](https://github.com/gituser-rs)
2.1.0
* Use [`sdd`](https://crates.io/crates/sdd) as the memory reclaimer.
2.0.20
* Relax trait bounds of `TreeIndex`.
2.0.19
* Remove unnecessary trait bounds from type definitions of `HashCache`, `HashIndex`, `HashMap`, and `HashSet`.
* Fix [#135](https://github.com/wvwwvwwv/scalable-concurrent-containers/issues/135).
2.0.18
* API update: add `Entry::take_inner`.
* Much faster `Queue` and `Stack` entry garbage collection.
2.0.17
* Faster `Queue` and `Stack` entry garbage collection.
2.0.16
* Fix an issue with `HashCache` where an evicted entry is dropped without notifying it when `HashCache` shrinks.
2.0.15
* Fix [#122](https://github.com/wvwwvwwv/scalable-concurrent-containers/issues/122).
2.0.14
* Fix [#120](https://github.com/wvwwvwwv/scalable-concurrent-containers/issues/120).
* More aggressive `TreeIndex` root node cleanup.
2.0.13
* Add `iter` to `Queue` and `Stack`.
* Add `len` to `Bag`, `Queue`, and `Stack`.
2.0.12
* Fix an issue with `tree_index::Range` where it intermittently fails to find the minimum key in a `TreeIndex` if the `TreeIndex` is being updated by other threads.
2.0.10 - 2.0.11
* Fix [#121](https://github.com/wvwwvwwv/scalable-concurrent-containers/issues/121).
2.0.9
* Add `TreeIndex::contains` and `TreeIndex::remove_range`; `TreeIndex::remove_range` is experimental and will be stabilized later ([#120](https://github.com/wvwwvwwv/scalable-concurrent-containers/issues/120)).
2.0.8
* Add support for old Rust versions >= 1.65.0.
2.0.7
* Add `bucket_index` to `HashIndex`, `HashMap`, and `HashSet`.
2.0.6
* Fix [#118](https://github.com/wvwwvwwv/scalable-concurrent-containers/issues/118).
2.0.5
* Add support for 32-bit binaries.
* Fix [#116](https://github.com/wvwwvwwv/scalable-concurrent-containers/issues/116).
2.0.4
* Fix [#115](https://github.com/wvwwvwwv/scalable-concurrent-containers/issues/115).
2.0.3
* Add `IntoIter` to `Bag`.
2.0.2
* Enhance the wait queue implementation.
2.0.1
* Minor code cleanup.
2.0.0
* New API.
### API update
* `*::Visitor` -> `*::Iter`.
* `*::Accessor` -> `*::IterMut`.
* `ebr::Arc` -> `ebr::Shared`.
* `ebr::Arc::get_ref_with` -> `ebr::Shared::get_guarded_ref`.
* `ebr::Arc::ptr` -> `ebr::Shared::get_guarded_ptr`.
* `ebr::Arc::release_drop_in_place` -> `ebr::Shared::drop_in_place`.
* `ebr::AtomicArc` -> `ebr::AtomicShared`.
* `ebr::AtomicArc::get_arc` -> `ebr::AtomicShared::get_shared`.
* `ebr::AtomicArc::try_into_arc` -> `ebr::AtomicShared::into_shared`.
* `ebr::AtomicOwned::try_into_owned` -> `ebr::AtomicOwned::into_owned`.
* `ebr::Barrier` -> `ebr::Guard`.
* `ebr::Owned::get_ref_with` -> `ebr::Owned::get_guarded_ref`.
* `ebr::Owned::ptr` -> `ebr::Owned::get_guarded_ptr`.
* `ebr::Ptr::as_raw` -> `ebr::Ptr::as_ptr`.
* `ebr::Ptr::get_arc` -> `ebr::Ptr::get_shared`.
* `*::first_occupied_entry*` -> `*::first_entry*`.
* `HashIndex::read` -> `HashIndex::peek_with`.
* `HashIndex::read_with` -> `HashIndex::peek`.
* `Queue::peek` -> `Queue::peek_with`.
* `Queue::peek_with` -> `Queue::peek`.
* `Stack::peek` -> `Stack::peek_with`.
* `Stack::peek_with` -> `Stack::peek`.
* `TreeIndex::read` -> `TreeIndex::peek_with`.
* `TreeIndex::read_with` -> `TreeIndex::peek`.
* Remove `HashMap::upsert*`: superseded by `hash_map::Entry::and_modify` and `hash_map::Entry::or_insert`.
```rust
use scc::HashMap;
let hashmap: HashMap<u64, u32> = HashMap::default();
```rust
use scc::HashMap;
let hashmap: HashMap<u64, u32> = HashMap::default();
assert!(hashmap.insert(1, 1).is_ok());