From e66b3a20c88569d7fcf295523fcc2446ca90457b Mon Sep 17 00:00:00 2001 From: Kevin Mehall Date: Tue, 14 Mar 2017 20:51:00 -0700 Subject: [PATCH] Fix documentation for Vec::dedup_by. The previous docstring was copied from dedup_by_key. --- src/libcollections/vec.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index d38c9f6e1cf80..7b0170ea65655 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -838,7 +838,11 @@ impl Vec { 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. ///