From 4eae07f14e5198044576fcb28a75dfff4f6cd9b2 Mon Sep 17 00:00:00 2001 From: Colin Rofls Date: Thu, 19 Dec 2024 10:52:19 -0500 Subject: [PATCH] [crater] Make summary sort order deterministic 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. --- fontc_crater/src/ci/html.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fontc_crater/src/ci/html.rs b/fontc_crater/src/ci/html.rs index 35fd3e1f..f087b45e 100644 --- a/fontc_crater/src/ci/html.rs +++ b/fontc_crater/src/ci/html.rs @@ -367,7 +367,7 @@ fn make_summary_report(current: &DiffResults) -> Markup { }) .into_iter() .collect::>(); - results.sort_by_key(|(_, count)| -*count); + results.sort_by_key(|(item, count)| (-*count, *item)); if results.is_empty() { return html!();