Skip to content

Commit

Permalink
Rollup merge of rust-lang#72876 - TrolledWoods:patch-2, r=Dylan-DPC
Browse files Browse the repository at this point in the history
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().
  • Loading branch information
Manishearth authored Jun 23, 2020
2 parents 7d2fba1 + 0c5c644 commit 317a151
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/liballoc/collections/btree/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 317a151

Please sign in to comment.