docs: make HashSet::retain doctest more clear
This commit is contained in:
parent
84f22e44c5
commit
43bec83266
1 changed files with 1 additions and 1 deletions
|
|
@ -317,7 +317,7 @@ impl<T, S> HashSet<T, S> {
|
|||
///
|
||||
/// let mut set = HashSet::from([1, 2, 3, 4, 5, 6]);
|
||||
/// set.retain(|&k| k % 2 == 0);
|
||||
/// assert_eq!(set.len(), 3);
|
||||
/// assert_eq!(set, HashSet::from([2, 4, 6]));
|
||||
/// ```
|
||||
///
|
||||
/// # Performance
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue