2021 day1/rust: prettify
This commit is contained in:
parent
338f4ef241
commit
9c8bbf40a3
1 changed files with 2 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
|||
#![warn(clippy::pedantic)]
|
||||
use itertools::Itertools;
|
||||
use std::io::{self, BufRead};
|
||||
|
||||
|
@ -18,7 +19,7 @@ fn main() {
|
|||
count_increasing(
|
||||
numbers
|
||||
.windows(3)
|
||||
.map(|window| -> usize { window.iter().sum() })
|
||||
.map(|window| window.iter().sum::<usize>())
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue