2021 day1/rust: prettify
This commit is contained in:
parent
ba68214754
commit
59714dd83d
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