Skip to content

Commit

Permalink
2023: Fix lints for day 2
Browse files Browse the repository at this point in the history
  • Loading branch information
connorslade committed Dec 3, 2023
1 parent 21a4282 commit 407855c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aoc_2023/src/day_02.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
Expand All @@ -45,7 +45,7 @@ fn parse(input: &str) -> Vec<Vec<CubeSet>> {
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::<u32>().unwrap();
let color = iter.next().unwrap();

Expand Down

0 comments on commit 407855c

Please sign in to comment.