about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorClément Renault <renault.cle@gmail.com>2018-09-08 15:33:02 +0200
committerClément Renault <renault.cle@gmail.com>2018-09-23 09:09:54 +0200
commit78bccb3540ae8082d34e45be5abb19ed720e9a32 (patch)
tree384e206e5c633028144a17864810bfdf96fe0270 /src/liballoc
parent7714c430ae1f771001fc0a1b083752485baba56e (diff)
downloadrust-78bccb3540ae8082d34e45be5abb19ed720e9a32.tar.gz
rust-78bccb3540ae8082d34e45be5abb19ed720e9a32.zip
Introduce the partition_dedup/by/by_key methods for slices
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/vec.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs
index 7fc4453fec5..3f49d99989d 100644
--- a/src/liballoc/vec.rs
+++ b/src/liballoc/vec.rs
@@ -947,10 +947,9 @@ impl<T> Vec<T> {
     /// Removes all but the first of consecutive elements in the vector satisfying a given equality
     /// relation.
     ///
-    /// The `same_bucket` function is passed references to two elements from the vector, and
-    /// returns `true` if the elements compare equal, or `false` if they do not. The elements are
-    /// passed in opposite order from their order in the vector, so if `same_bucket(a, b)` returns
-    /// `true`, `a` is removed.
+    /// The `same_bucket` function is passed references to two elements from the vector and
+    /// must determine if the elements compare equal. The elements are passed in opposite order
+    /// from their order in the slice, so if `same_bucket(a, b)` returns `true`, `a` is removed.
     ///
     /// If the vector is sorted, this removes all duplicates.
     ///
@@ -1533,7 +1532,8 @@ impl<'a> Drop for SetLenOnDrop<'a> {
 }
 
 impl<T: PartialEq> Vec<T> {
-    /// Removes consecutive repeated elements in the vector.
+    /// Removes consecutive repeated elements in the vector according to the
+    /// [`PartialEq`] trait implementation.
     ///
     /// If the vector is sorted, this removes all duplicates.
     ///