From 5c3a631dde9b6d36d087d056fd1ce704f79a8e50 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Fri, 3 Dec 2021 17:35:41 +0100 Subject: [PATCH] 2021: day02: formatting --- aoc2021/src/day02.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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, } }