Skip to content

Commit 317a151

Browse files
authored
Rollup merge of rust-lang#72876 - TrolledWoods:patch-2, r=Dylan-DPC
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().
2 parents 7d2fba1 + 0c5c644 commit 317a151

File tree

1 file changed

+2
-0
lines changed
  • src/liballoc/collections/btree

1 file changed

+2
-0
lines changed

src/liballoc/collections/btree/map.rs

+2
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,8 @@ struct MergeIter<K, V, I: Iterator<Item = (K, V)>> {
490490
impl<K: Ord, V> BTreeMap<K, V> {
491491
/// Makes a new empty BTreeMap with a reasonable choice for B.
492492
///
493+
/// Does not allocate anything on its own.
494+
///
493495
/// # Examples
494496
///
495497
/// Basic usage:

0 commit comments

Comments
 (0)