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>
This commit is contained in:
Paul Mabileau 2025-05-17 02:14:55 +02:00
parent d29d1a332b
commit cd5772e396
No known key found for this signature in database
GPG key ID: D4C0E25A7BA15A68

View file

@ -276,10 +276,10 @@ impl<T, S> HashSet<T, S> {
Drain { base: self.base.drain() }
}
/// Creates an iterator which uses a closure to determine if a value should be removed.
/// Creates an iterator which uses a closure to determine if an element should be removed.
///
/// If the closure returns true, then the value is removed and yielded.
/// If the closure returns false, the value will remain in the list and will not be yielded
/// If the closure returns true, then the element is removed and yielded.
/// If the closure returns false, the element will remain in the list and will not be yielded
/// by the iterator.
///
/// If the returned `ExtractIf` is not exhausted, e.g. because it is dropped without iterating