about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2017-03-17 08:49:08 -0400
committerGitHub <noreply@github.com>2017-03-17 08:49:08 -0400
commitdc1deeb9b429be681bcbe98d239e309fb293f1fe (patch)
tree826d223faa40a14355102f38143064ed823fa9e2 /src
parent2ba4a636966e51b7f8f85047292abf947b2dbd99 (diff)
parente66b3a20c88569d7fcf295523fcc2446ca90457b (diff)
downloadrust-dc1deeb9b429be681bcbe98d239e309fb293f1fe.tar.gz
rust-dc1deeb9b429be681bcbe98d239e309fb293f1fe.zip
Rollup merge of #40536 - kevinmehall:dedup_docs_for_dedup_by, r=steveklabnik
Fix documentation for Vec::dedup_by.

The previous docstring was copied from dedup_by_key.
Diffstat (limited to 'src')
-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 f3cd5eee5c1..a717163f45e 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.
     ///