diff --git a/2022/rust/src/day1.rs b/2022/rust/src/day1.rs index 632b42a..10eb707 100644 --- a/2022/rust/src/day1.rs +++ b/2022/rust/src/day1.rs @@ -17,7 +17,7 @@ fn ordered_calories(input: &str) -> Vec { } } } - result.sort_by(|a, b| b.partial_cmp(a).unwrap()); + result.sort_by(|a, b| b.cmp(a)); result }