2021 day1/rust: prettify

This commit is contained in:
Xiretza 2021-12-04 12:18:49 +01:00
parent ba68214754
commit 59714dd83d

View file

@ -1,3 +1,4 @@
#![warn(clippy::pedantic)]
use itertools::Itertools; use itertools::Itertools;
use std::io::{self, BufRead}; use std::io::{self, BufRead};
@ -18,7 +19,7 @@ fn main() {
count_increasing( count_increasing(
numbers numbers
.windows(3) .windows(3)
.map(|window| -> usize { window.iter().sum() }) .map(|window| window.iter().sum::<usize>())
) )
); );
} }