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
@@ -64,7 +64,7 @@ where
return;
}
addresses.sort_unstable_by(|a, b| a.as_ref().cmp(b.as_ref()));
addresses.sort_by(|a, b| a.as_ref().cmp(b.as_ref()));
self.cache.insert(id, addresses);
}
@@ -94,7 +94,7 @@ where
.collect::<Vec<Addr>>();
addresses.dedup();
addresses.sort_unstable_by(|a, b| a.as_ref().cmp(b.as_ref()));
addresses.sort_by(|a, b| a.as_ref().cmp(b.as_ref()));
addresses
.choose_multiple(&mut rng, MAX_NUM_AUTHORITY_CONN)
@@ -57,7 +57,7 @@ impl RegisteredProtocol {
id: protocol,
supported_versions: {
let mut tmp = versions.to_vec();
tmp.sort_unstable_by(|a, b| b.cmp(&a));
tmp.sort_by(|a, b| b.cmp(&a));
tmp
},
handshake_message,