rustfmt
This commit is contained in:
@ -13,7 +13,7 @@ const ZERO: IVec2 = IVec2::new(0, 0);
|
||||
|
||||
fn main() {
|
||||
const INPUT: &str = include_str!("../input.txt");
|
||||
|
||||
|
||||
let mut visited: HashSet<IVec2> = HashSet::new();
|
||||
|
||||
let mut knots: [IVec2; 10] = [ZERO; 10];
|
||||
@ -25,7 +25,7 @@ fn main() {
|
||||
'L' => LEFT,
|
||||
'U' => UP,
|
||||
'D' => DOWN,
|
||||
_ => ZERO,
|
||||
_ => ZERO,
|
||||
};
|
||||
let steps: u32 = steps.parse().unwrap();
|
||||
|
||||
@ -46,7 +46,7 @@ fn main() {
|
||||
if diff.x == 0 {
|
||||
knot.y += diff.y.signum();
|
||||
} else if diff.y == 0 {
|
||||
knot.x += diff.x.signum();
|
||||
knot.x += diff.x.signum();
|
||||
} else {
|
||||
knot.x += diff.x.signum();
|
||||
knot.y += diff.y.signum();
|
||||
|
Reference in New Issue
Block a user