From 0c5c644c91edf6ed949cfa5ffc524f43369df604 Mon Sep 17 00:00:00 2001 From: TrolledWoods Date: Mon, 1 Jun 2020 08:18:34 +0200 Subject: [PATCH] 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(). --- src/liballoc/collections/btree/map.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/liballoc/collections/btree/map.rs b/src/liballoc/collections/btree/map.rs index fa1c09d9ece87..688d660a02afd 100644 --- a/src/liballoc/collections/btree/map.rs +++ b/src/liballoc/collections/btree/map.rs @@ -490,6 +490,8 @@ struct MergeIter> { impl BTreeMap { /// Makes a new empty BTreeMap with a reasonable choice for B. /// + /// Does not allocate anything on its own. + /// /// # Examples /// /// Basic usage: