Skip to content

Commit cd5772e

Browse files
committed
Docs(lib/coll/hm): Reword extract_if to use element instead of value
A minor change, but it seemed interesting to unify this one's description, especially considering all the other equivalents use `element` as well. Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
1 parent d29d1a3 commit cd5772e

File tree

1 file changed

+3
-3
lines changed
  • library/std/src/collections/hash

1 file changed

+3
-3
lines changed

library/std/src/collections/hash/set.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,10 @@ impl<T, S> HashSet<T, S> {
276276
Drain { base: self.base.drain() }
277277
}
278278

279-
/// Creates an iterator which uses a closure to determine if a value should be removed.
279+
/// Creates an iterator which uses a closure to determine if an element should be removed.
280280
///
281-
/// If the closure returns true, then the value is removed and yielded.
282-
/// If the closure returns false, the value will remain in the list and will not be yielded
281+
/// If the closure returns true, then the element is removed and yielded.
282+
/// If the closure returns false, the element will remain in the list and will not be yielded
283283
/// by the iterator.
284284
///
285285
/// If the returned `ExtractIf` is not exhausted, e.g. because it is dropped without iterating

0 commit comments

Comments
 (0)