Skip to content

Commit

Permalink
Mention that BTreeMap::new() doesn't allocate
Browse files Browse the repository at this point in the history
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
TrolledWoods committed Jun 1, 2020
1 parent 0d93d3f commit 0c5c644
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 0c5c644

Please sign in to comment.