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().
This commit is contained in:
TrolledWoods 2020-06-01 08:18:34 +02:00 committed by GitHub
parent 0d93d3f4a4
commit 0c5c644c91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: