2022 rust day 2
This commit is contained in:
parent
5b38020265
commit
00d244377d
|
@ -1,3 +1,4 @@
|
||||||
|
#![allow(dead_code)]
|
||||||
use crate::utils;
|
use crate::utils;
|
||||||
|
|
||||||
|
|
||||||
|
@ -103,7 +104,7 @@ fn solve1(data: &Vec<(char, char)>) -> i32 {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fn solve2(data: &Vec<(char, char)>) -> impl std::fmt::Display {
|
fn solve2(data: &Vec<(char, char)>) -> i32 {
|
||||||
data.iter()
|
data.iter()
|
||||||
.fold(0, |acc, (other, result)| {
|
.fold(0, |acc, (other, result)| {
|
||||||
let result = MatchResult::from(result);
|
let result = MatchResult::from(result);
|
||||||
|
|
Loading…
Reference in a new issue