From e9989d526dd638fd03599d80d2e5658381f4ee68 Mon Sep 17 00:00:00 2001 From: Steve Klabnik Date: Wed, 4 Nov 2015 10:19:54 +0100 Subject: [PATCH] Add note about HashMap::capacity's bounds Fixes #24591 --- src/libstd/collections/hash/map.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index 7c6add80337c0..965226f6355c2 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -601,6 +601,9 @@ impl HashMap /// Returns the number of elements the map can hold without reallocating. /// + /// This number is a lower bound; the `HashMap` might be able to hold + /// more, but is guaranteed to be able to hold at least this many. + /// /// # Examples /// /// ```