Skip to content

Commit e9989d5

Browse files
committed
Add note about HashMap::capacity's bounds
Fixes #24591
1 parent a216e84 commit e9989d5

File tree

1 file changed

+3
-0
lines changed
  • src/libstd/collections/hash

1 file changed

+3
-0
lines changed

src/libstd/collections/hash/map.rs

+3
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,9 @@ impl<K, V, S> HashMap<K, V, S>
601601

602602
/// Returns the number of elements the map can hold without reallocating.
603603
///
604+
/// This number is a lower bound; the `HashMap<K, V>` might be able to hold
605+
/// more, but is guaranteed to be able to hold at least this many.
606+
///
604607
/// # Examples
605608
///
606609
/// ```

0 commit comments

Comments
 (0)