We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6f10e2f commit e66b3a2Copy full SHA for e66b3a2
src/libcollections/vec.rs
@@ -838,7 +838,11 @@ impl<T> Vec<T> {
838
self.dedup_by(|a, b| key(a) == key(b))
839
}
840
841
- /// Removes consecutive elements in the vector that resolve to the same key.
+ /// Removes consecutive elements in the vector according to a predicate.
842
+ ///
843
+ /// The `same_bucket` function is passed references to two elements from the vector, and
844
+ /// returns `true` if the elements compare equal, or `false` if they do not. Only the first
845
+ /// of adjacent equal items is kept.
846
///
847
/// If the vector is sorted, this removes all duplicates.
848
0 commit comments