diff --git a/aoc2021/src/day02.rs b/aoc2021/src/day02.rs index a65b4e1..f144b45 100644 --- a/aoc2021/src/day02.rs +++ b/aoc2021/src/day02.rs @@ -47,12 +47,8 @@ fn part2(input: &str) -> Result { horizontal_pos += dx; depth += aim * dx; } - Command::Up(dz) => { - aim -= dz; - } - Command::Down(dz) => { - aim += dz; - } + Command::Up(dz) => aim -= dz, + Command::Down(dz) => aim += dz, } }