about summary refs log tree commit diff
path: root/src/libcollections
diff options
context:
space:
mode:
authorKevin Mehall <km@kevinmehall.net>2017-03-14 20:51:00 -0700
committerKevin Mehall <km@kevinmehall.net>2017-03-15 07:56:33 -0700
commite66b3a20c88569d7fcf295523fcc2446ca90457b (patch)
tree9900cec162bd0b3d43683af71ca8932d535da89b /src/libcollections
parent6f10e2f63de720468e2b4bfcb275e4b90b1f9870 (diff)
downloadrust-e66b3a20c88569d7fcf295523fcc2446ca90457b.tar.gz
rust-e66b3a20c88569d7fcf295523fcc2446ca90457b.zip
Fix documentation for Vec::dedup_by.
The previous docstring was copied from dedup_by_key.
Diffstat (limited to 'src/libcollections')
-rw-r--r--src/libcollections/vec.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs
index d38c9f6e1cf..7b0170ea656 100644
--- a/src/libcollections/vec.rs
+++ b/src/libcollections/vec.rs
@@ -838,7 +838,11 @@ impl<T> Vec<T> {
         self.dedup_by(|a, b| key(a) == key(b))
     }
 
-    /// Removes consecutive elements in the vector that resolve to the same key.
+    /// Removes consecutive elements in the vector according to a predicate.
+    ///
+    /// 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. Only the first
+    /// of adjacent equal items is kept.
     ///
     /// If the vector is sorted, this removes all duplicates.
     ///