未验证 提交 317a1514 编写于 作者: M Manish Goregaokar 提交者: GitHub

Rollup merge of #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().
...@@ -490,6 +490,8 @@ struct MergeIter<K, V, I: Iterator<Item = (K, V)>> { ...@@ -490,6 +490,8 @@ struct MergeIter<K, V, I: Iterator<Item = (K, V)>> {
impl<K: Ord, V> BTreeMap<K, V> { impl<K: Ord, V> BTreeMap<K, V> {
/// Makes a new empty BTreeMap with a reasonable choice for B. /// Makes a new empty BTreeMap with a reasonable choice for B.
/// ///
/// Does not allocate anything on its own.
///
/// # Examples /// # Examples
/// ///
/// Basic usage: /// Basic usage:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册