diff --git a/aoc_2023/src/day_02.rs b/aoc_2023/src/day_02.rs index 76dea2a..00075f5 100644 --- a/aoc_2023/src/day_02.rs +++ b/aoc_2023/src/day_02.rs @@ -26,7 +26,7 @@ impl Solution for Day02 { .map(|games| { let mut max = CubeSet::default(); for game in games { - max = max.max(&game); + max = max.max(game); } max.red * max.green * max.blue }) @@ -45,7 +45,7 @@ fn parse(input: &str) -> Vec> { for game in cubes.split(';') { let mut cubes = CubeSet::default(); for i in game.split(',') { - let mut iter = i.trim().split_whitespace(); + let mut iter = i.split_whitespace(); let count = iter.next().unwrap().parse::().unwrap(); let color = iter.next().unwrap();