Cleanup our sort usage (#6754)

This commit is contained in:
Gavin Wood
2020-07-29 14:00:51 +02:00
committed by GitHub
parent 1ab7719314
commit 6bfbb7c6f1
12 changed files with 16 additions and 16 deletions
@@ -1211,7 +1211,7 @@ where
/// the order of items is not preserved.
fn has_duplicates<T: PartialEq + AsRef<[u8]>>(items: &mut Vec<T>) -> bool {
// Sort the vector
items.sort_unstable_by(|a, b| {
items.sort_by(|a, b| {
Ord::cmp(a.as_ref(), b.as_ref())
});
// And then find any two consecutive equal elements.