Use unstable sort by key for performance
This commit is contained in:
parent
641d9554b1
commit
351b656a82
@ -395,7 +395,7 @@ impl SignersContainer {
|
|||||||
/// Returns the list of signers in the container, sorted by lowest to highest `ordering`
|
/// Returns the list of signers in the container, sorted by lowest to highest `ordering`
|
||||||
pub fn signers(&self) -> Vec<&Arc<dyn Signer>> {
|
pub fn signers(&self) -> Vec<&Arc<dyn Signer>> {
|
||||||
let mut items = self.0.iter().collect::<Vec<_>>();
|
let mut items = self.0.iter().collect::<Vec<_>>();
|
||||||
items.sort_by(|(a, _), (b, _)| (*a).cmp(*b));
|
items.sort_unstable_by_key(|(key, _)| *key);
|
||||||
items.into_iter().map(|(_, v)| v).collect()
|
items.into_iter().map(|(_, v)| v).collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user