chore: address some clippy::pedantic warnings (#55)

This commit is contained in:
Felix Spöttel
2023-12-11 09:43:59 +01:00
committed by GitHub
parent 84208a663a
commit f43530b297
5 changed files with 21 additions and 18 deletions

View File

@@ -38,7 +38,7 @@ impl Timings {
match s {
Ok(timings) => timings,
Err(e) => {
eprintln!("{}", e);
eprintln!("{e}");
Timings::default()
}
}
@@ -67,10 +67,10 @@ impl Timings {
self.data.iter().map(|x| x.total_nanos).sum::<f64>() / 1_000_000_f64
}
pub fn is_day_complete(&self, day: &Day) -> bool {
pub fn is_day_complete(&self, day: Day) -> bool {
self.data
.iter()
.any(|t| &t.day == day && t.part_1.is_some() && t.part_2.is_some())
.any(|t| t.day == day && t.part_1.is_some() && t.part_2.is_some())
}
}