@@ -512,14 +512,12 @@ fn counters_dump_csv(
512
512
) {
513
513
// Sort the counters.
514
514
match opts. sort {
515
- Some ( Order :: Value ) => counters. sort_unstable_by (
515
+ Some ( Order :: Value ) => counters. sort_by (
516
516
& mut |_, a : & CounterVariant , _, b : & CounterVariant | {
517
517
a. total ( ) . cmp ( & b. total ( ) ) . reverse ( )
518
518
} ,
519
519
) ,
520
- Some ( Order :: Alpha ) => {
521
- counters. sort_unstable_by ( & mut |a, _, b, _| a. cmp ( b) )
522
- }
520
+ Some ( Order :: Alpha ) => counters. sort_by ( & mut |a, _, b, _| a. cmp ( b) ) ,
523
521
_ => { }
524
522
}
525
523
@@ -574,13 +572,13 @@ fn counter_dump(counters: &mut Counters, opts: &Options, pad: &str) {
574
572
// Therefore, sort by value by default, so the highest-valued counters
575
573
// are shown first.
576
574
Options { sort : Some ( Order :: Value ) , .. }
577
- | Options { sort : None , full : false , .. } => counters. sort_unstable_by (
575
+ | Options { sort : None , full : false , .. } => counters. sort_by (
578
576
& mut |_, a : & CounterVariant , _, b : & CounterVariant | {
579
577
a. total ( ) . cmp ( & b. total ( ) ) . reverse ( )
580
578
} ,
581
579
) ,
582
580
Options { sort : Some ( Order :: Alpha ) , .. } => {
583
- counters. sort_unstable_by ( & mut |a, _, b, _| a. cmp ( b) )
581
+ counters. sort_by ( & mut |a, _, b, _| a. cmp ( b) )
584
582
}
585
583
}
586
584
0 commit comments