Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "ringmap"
edition = "2021"
version = "0.2.0"
version = "0.2.1"
documentation = "https://docs.rs/ringmap/"
repository = "https://github.com/indexmap-rs/ringmap"
license = "Apache-2.0 OR MIT"
Expand All @@ -15,6 +15,7 @@ bench = false

[dependencies]
equivalent = { version = "1.0", default-features = false }
hashbrown = { version = "0.16.1", default-features = false }

arbitrary = { version = "1.0", optional = true, default-features = false }
quickcheck = { version = "1.0", optional = true, default-features = false }
Expand All @@ -23,10 +24,6 @@ borsh = { version = "1.2", optional = true, default-features = false }
rayon = { version = "1.9", optional = true }
sval = { version = "2", optional = true, default-features = false }

[dependencies.hashbrown]
version = "0.16.0"
default-features = false

# serde v1.0.220 is the first version that released with `serde_core`.
# This is required to avoid conflict with other `serde` users which may require an older version.
[target.'cfg(any())'.dependencies]
Expand Down
4 changes: 4 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Releases

## 0.2.1 (2025-11-20)

- Simplified a lot of internals using `hashbrown`'s new bucket API.

## 0.2.0 (2025-10-18)

- **MSRV**: Rust 1.82.0 or later is now required.
Expand Down
7 changes: 2 additions & 5 deletions src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ where
/// Computes in **O(1)** time (amortized average).
pub fn entry(&mut self, key: K) -> Entry<'_, K, V> {
let hash = self.hash(&key);
self.core.entry(hash, key)
Entry::new(&mut self.core, hash, key)
}

/// Creates a splicing iterator that replaces the specified range in the map
Expand Down Expand Up @@ -1564,10 +1564,7 @@ impl<K, V, S> RingMap<K, V, S> {
///
/// Computes in **O(1)** time.
pub fn get_index_entry(&mut self, index: usize) -> Option<IndexedEntry<'_, K, V>> {
if index >= self.len() {
return None;
}
Some(IndexedEntry::new(&mut self.core, index))
IndexedEntry::new(&mut self.core, index)
}

/// Get an array of `N` key-value pairs by `N` indices
Expand Down
Loading