moved final calculations to their respective parts
This commit is contained in:
parent
8509a884ff
commit
ab0889b661
@ -76,16 +76,15 @@ pub fn run() {
|
|||||||
})
|
})
|
||||||
.collect::<Vec<_>>();
|
.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")]
|
#[cfg(feature = "part1")]
|
||||||
{
|
{
|
||||||
|
let count = res.iter().filter(|e| e.0).count();
|
||||||
println!("Day 8, Part 01: {}", count);
|
println!("Day 8, Part 01: {}", count);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "part2")]
|
#[cfg(feature = "part2")]
|
||||||
{
|
{
|
||||||
|
let max_score = res.iter().map(|e| e.1).max().unwrap();
|
||||||
println!("Day 8, Part 02: {}", max_score);
|
println!("Day 8, Part 02: {}", max_score);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user