about summary refs log tree commit diff
path: root/src/liballoc/collections
diff options
context:
space:
mode:
authorTrolledWoods <trolledwoods@gmail.com>2020-06-01 08:18:34 +0200
committerGitHub <noreply@github.com>2020-06-01 08:18:34 +0200
commit0c5c644c91edf6ed949cfa5ffc524f43369df604 (patch)
tree7ddfc3eb47d5a5e760304faf3ec27b47f6da8d19 /src/liballoc/collections
parent0d93d3f4a42fd45b2a0da658d39555316a1b6793 (diff)
downloadrust-0c5c644c91edf6ed949cfa5ffc524f43369df604.tar.gz
rust-0c5c644c91edf6ed949cfa5ffc524f43369df604.zip
Mention that BTreeMap::new() doesn't allocate
I think it would be nice to mention this, so you don't have to dig through the src to look at the definition of new().
Diffstat (limited to 'src/liballoc/collections')
-rw-r--r--src/liballoc/collections/btree/map.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/liballoc/collections/btree/map.rs b/src/liballoc/collections/btree/map.rs
index fa1c09d9ece..688d660a02a 100644
--- a/src/liballoc/collections/btree/map.rs
+++ b/src/liballoc/collections/btree/map.rs
@@ -490,6 +490,8 @@ struct MergeIter<K, V, I: Iterator<Item = (K, V)>> {
 impl<K: Ord, V> BTreeMap<K, V> {
     /// Makes a new empty BTreeMap with a reasonable choice for B.
     ///
+    /// Does not allocate anything on its own.
+    ///
     /// # Examples
     ///
     /// Basic usage: