Skip to content

Commit

Permalink
[crater] Make summary sort order deterministic
Browse files Browse the repository at this point in the history
Because these came from a hashmap and we then sorted only by the count,
if counts were equal the ordering could change between runs, which was
causing us to push a bunch of unnecessary commits.
  • Loading branch information
cmyr committed Dec 19, 2024
1 parent f4bbddc commit 4eae07f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fontc_crater/src/ci/html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ fn make_summary_report(current: &DiffResults) -> Markup {
})
.into_iter()
.collect::<Vec<_>>();
results.sort_by_key(|(_, count)| -*count);
results.sort_by_key(|(item, count)| (-*count, *item));

if results.is_empty() {
return html!();
Expand Down

0 comments on commit 4eae07f

Please sign in to comment.