Skip to content

Commit 7803ca1

Browse files
committed
Also fix capacity of Poolable for HashMap<T>
It seems the hashmap capacity is, similarly to Vec, not exactly controllable and we can not always guarantee len == capacity. Again similarly when Block::size() returns a given lenght you expect to be able to index to this length.
1 parent f4c91d7 commit 7803ca1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/poolable.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ where
2323
S: BuildHasher + Default,
2424
{
2525
fn capacity(&self) -> usize {
26-
self.capacity()
26+
self.len()
2727
}
2828

2929
fn alloc(size: usize) -> Self {

0 commit comments

Comments
 (0)