mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 22:41:06 +00:00
Avoid Unstable Sort (#12455)
* dont use unstable sort * remove comment * add clippy rule
This commit is contained in:
@@ -155,7 +155,7 @@ pub fn trim_helpers() -> TrimHelpers {
|
||||
seq_phragmen(desired_targets as usize, targets.clone(), voters.clone(), None).unwrap();
|
||||
|
||||
// sort by decreasing order of stake
|
||||
assignments.sort_unstable_by_key(|assignment| {
|
||||
assignments.sort_by_key(|assignment| {
|
||||
std::cmp::Reverse(stakes.get(&assignment.who).cloned().unwrap_or_default())
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user