clippies
This commit is contained in:
1 parent
aed73754c8
commit
a7c32b213f
5 files changed
+18
-20
No files matched your search
+2
-2
@@ -20,12 +20,12 @@ fn parse(input: &[u8]) -> Vec<u64> {
|
||||
}
|
||||
|
||||
#[aoc(day1, part1)]
|
||||
fn part1(input: &Vec<u64>) -> u64 {
|
||||
fn part1(input: &[u64]) -> u64 {
|
||||
*input.iter().max().unwrap()
|
||||
}
|
||||
|
||||
#[aoc(day1, part2)]
|
||||
fn part2(input: &Vec<u64>) -> u64 {
|
||||
fn part2(input: &[u64]) -> u64 {
|
||||
input.iter().sorted().rev().take(3).sum::<u64>()
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user