From 443632378efd9144e045a8f4fb62ba3326c438b9 Mon Sep 17 00:00:00 2001 From: Julius de Jeu Date: Thu, 2 Dec 2021 08:53:07 +0100 Subject: [PATCH] Clean up day 2 a bit --- src/day02.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/day02.rs b/src/day02.rs index cad3a0c..725fe3a 100644 --- a/src/day02.rs +++ b/src/day02.rs @@ -37,12 +37,8 @@ impl Day for Day02 { fw += n; depth += aim * n; } - Instruction::Down(n) => { - aim += n; - } - Instruction::Up(n) => { - aim -= n; - } + Instruction::Down(n) => aim += n, + Instruction::Up(n) => aim -= n, } } format!("{}", depth * fw)