Skip to content

Commit

Permalink
Update the change log and source code comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsuya6502 committed Jun 7, 2023
1 parent 90fa847 commit 4143cc0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ Bumped the minimum supported Rust version (MSRV) to 1.65 (Nov 3, 2022).

- Removed `num_cpus` crate from the dependency. ([#277][gh-pull-0277])

### Changed

- Refactored internal methods of the concurrent hash table to reduce compile times.
([#265][gh-pull-0265], by [@Swatinem][gh-Swatinem])


## Version 0.11.1

### Fixed
Expand All @@ -21,6 +27,7 @@ Bumped the minimum supported Rust version (MSRV) to 1.65 (Nov 3, 2022).
- Added some example programs to the `examples` directory. ([#268][gh-pull-0268], by
[@peter-scholtens][gh-peter-scholtens])


## Version 0.11.0

### Added
Expand Down Expand Up @@ -673,6 +680,7 @@ The minimum supported Rust version (MSRV) is now 1.51.0 (Mar 25, 2021).
[gh-pull-0275]: https://github.com/moka-rs/moka/pull/275/
[gh-pull-0272]: https://github.com/moka-rs/moka/pull/272/
[gh-pull-0268]: https://github.com/moka-rs/moka/pull/268/
[gh-pull-0265]: https://github.com/moka-rs/moka/pull/265/
[gh-pull-0259]: https://github.com/moka-rs/moka/pull/259/
[gh-pull-0251]: https://github.com/moka-rs/moka/pull/251/
[gh-pull-0248]: https://github.com/moka-rs/moka/pull/248/
Expand Down
4 changes: 3 additions & 1 deletion src/cht/map/bucket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,9 @@ impl<'g, K: 'g, V: 'g> BucketArray<K, V> {
fn probe(&self, guard: &'g Guard, hash: u64) -> Probe<'_, 'g, K, V> {
let buckets = &self.buckets;
let offset = hash as usize & (buckets.len() - 1);
// FIXME: this will panic if `len() == 0`
// SAFETY: `len()` is never be 0 so this index access will never panic.
// This invariant is ensured by the `assert!()` at the beginning of
// `with_length()` because 0 is not a power of two.
let this_bucket = (offset, &buckets[offset]);
Probe {
buckets,
Expand Down

0 comments on commit 4143cc0

Please sign in to comment.