Clean up day 2 a bit
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Julius 2021-12-02 08:53:07 +01:00
parent 2b884fab65
commit 443632378e
Signed by: j00lz
GPG key ID: AF241B0AA237BBA2

View file

@ -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)