mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-10-23 04:06:20 +00:00
Cleanup our sort usage (#6754)
This commit is contained in:
1 parent
1ab7719314
commit
6bfbb7c6f1
12 files changed
+16
-16
No files matched your search
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user