提交 1599fad5 编写于 作者: C Corey Farwell

Show the capacity in HashSet::with_capacity doc example.

上级 9e2b0c63
......@@ -147,6 +147,7 @@ pub fn new() -> HashSet<T, RandomState> {
/// ```
/// use std::collections::HashSet;
/// let set: HashSet<i32> = HashSet::with_capacity(10);
/// assert!(set.capacity() >= 10);
/// ```
#[inline]
#[stable(feature = "rust1", since = "1.0.0")]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册