2021: day02: formatting
This commit is contained in:
parent
ebc5fe5425
commit
5c3a631dde
1 changed files with 2 additions and 6 deletions
|
|
@ -47,12 +47,8 @@ fn part2(input: &str) -> Result<u64> {
|
||||||
horizontal_pos += dx;
|
horizontal_pos += dx;
|
||||||
depth += aim * dx;
|
depth += aim * dx;
|
||||||
}
|
}
|
||||||
Command::Up(dz) => {
|
Command::Up(dz) => aim -= dz,
|
||||||
aim -= dz;
|
Command::Down(dz) => aim += dz,
|
||||||
}
|
|
||||||
Command::Down(dz) => {
|
|
||||||
aim += dz;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue