提交 e66b3a20 编写于 作者: K Kevin Mehall

Fix documentation for Vec::dedup_by.

The previous docstring was copied from dedup_by_key.
上级 6f10e2f6
......@@ -838,7 +838,11 @@ pub fn dedup_by_key<F, K>(&mut self, mut key: F) where F: FnMut(&mut T) -> K, K:
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.
///
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册