moved final calculations to their respective parts

This commit is contained in:
Max Nuding 2022-12-08 07:58:50 +00:00
parent 8509a884ff
commit ab0889b661

View File

@ -76,16 +76,15 @@ pub fn run() {
})
.collect::<Vec<_>>();
let count = res.iter().filter(|e| e.0).count();
let max_score = res.iter().map(|e| e.1).max().unwrap();
#[cfg(feature = "part1")]
{
let count = res.iter().filter(|e| e.0).count();
println!("Day 8, Part 01: {}", count);
}
#[cfg(feature = "part2")]
{
let max_score = res.iter().map(|e| e.1).max().unwrap();
println!("Day 8, Part 02: {}", max_score);
}
}