Skip to content

Commit

Permalink
docs: make HashSet::retain doctest more clear
Browse files Browse the repository at this point in the history
  • Loading branch information
Ezrashaw committed Jan 7, 2023
1 parent 84f22e4 commit 43bec83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/collections/hash/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 43bec83

Please sign in to comment.