Skip to content

Commit 3c95c02

Browse files
committed
Document the return value of IndexMapCore::push
1 parent db5be09 commit 3c95c02

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ rayon = { version = "1.0", optional = true }
3838
[dependencies.hashbrown]
3939
version = "0.8"
4040
default-features = false
41-
features = ["inline-more", "raw"]
41+
features = ["raw"]
4242

4343
[dev-dependencies]
4444
itertools = "0.9"

src/map_core.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ impl<K, V> IndexMapCore<K, V> {
176176
}
177177
}
178178

179-
/// Append a key-value pair, *without* checking whether it already exists.
179+
/// Append a key-value pair, *without* checking whether it already exists,
180+
/// and return the pair's new index.
180181
fn push(&mut self, hash: HashValue, key: K, value: V) -> usize {
181182
let i = self.entries.len();
182183
self.indices.insert(hash.get(), i, get_hash(&self.entries));

0 commit comments

Comments
 (0)