From ade29246e2f60f25901f5362a84be00dca2f8154 Mon Sep 17 00:00:00 2001 From: Tshepang Mbambo Date: Sun, 31 Jul 2022 22:55:22 +0200 Subject: [PATCH] use a more simple fn --- ci/date-check/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/date-check/src/main.rs b/ci/date-check/src/main.rs index 21f04f1e..ddbabc11 100644 --- a/ci/date-check/src/main.rs +++ b/ci/date-check/src/main.rs @@ -72,7 +72,7 @@ fn collect_dates_from_file(date_regexes: &[Regex], text: &str) -> Vec<(usize, Da .collect(); output.extend(results); } - output.sort_by(|a, b| a.0.cmp(&b.0)); + output.sort_by_key(|a| a.0); output }