Skip to content

Commit 7d1e5d7

Browse files
committed
Document the return value of IndexMapCore::push
1 parent db5be09 commit 7d1e5d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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)