Skip to content

Commit

Permalink
Fix documentation for Vec::dedup_by.
Browse files Browse the repository at this point in the history
The previous docstring was copied from dedup_by_key.
  • Loading branch information
kevinmehall committed Mar 15, 2017
1 parent 6f10e2f commit e66b3a2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/libcollections/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down

0 comments on commit e66b3a2

Please sign in to comment.