chore: use into for answers
This commit is contained in:
parent
a67033d39b
commit
6a54618880
7 changed files with 33 additions and 48 deletions
|
@ -17,9 +17,7 @@ impl Solution for Day04 {
|
|||
.map(xmas_count)
|
||||
.sum::<usize>();
|
||||
|
||||
let sum = horizontal + vertical + diag_45 + diag_135;
|
||||
|
||||
Answer::Number(sum as u64)
|
||||
(horizontal + vertical + diag_45 + diag_135).into()
|
||||
}
|
||||
|
||||
fn part_b(&self, input: &str) -> Answer {
|
||||
|
@ -32,7 +30,7 @@ impl Solution for Day04 {
|
|||
+ cross_mas_count(&input_180)
|
||||
+ cross_mas_count(&input_270);
|
||||
|
||||
Answer::Number(sum as u64)
|
||||
sum.into()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue