mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-03 12:13:43 +00:00
Show the capacity in HashSet::with_capacity doc example.
This commit is contained in:
parent
9e2b0c6390
commit
1599fad5b4
@ -147,6 +147,7 @@ impl<T: Hash + Eq> 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")]
|
||||
|
Loading…
Reference in New Issue
Block a user