Add note about HashMap::capacity's bounds

Fixes #24591
This commit is contained in:
Steve Klabnik 2015-11-04 10:19:54 +01:00
parent a216e84727
commit e9989d526d

View file

@ -601,6 +601,9 @@ impl<K, V, S> HashMap<K, V, S>
/// Returns the number of elements the map can hold without reallocating.
///
/// This number is a lower bound; the `HashMap<K, V>` might be able to hold
/// more, but is guaranteed to be able to hold at least this many.
///
/// # Examples
///
/// ```