chore: fix formatting

Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
Matej Focko 2022-09-09 18:56:13 +02:00
parent d7f8f4fd7b
commit e3888415f7
Signed by: mfocko
GPG key ID: 7C47D46246790496
5 changed files with 17 additions and 20 deletions

View file

@ -14,14 +14,11 @@ impl Reachable {
let reaches_pacific = y == 0 || x == 0; let reaches_pacific = y == 0 || x == 0;
let reaches_atlantic = y == max_y - 1 || x == max_x - 1; let reaches_atlantic = y == max_y - 1 || x == max_x - 1;
if reaches_atlantic && reaches_pacific { match (reaches_pacific, reaches_atlantic) {
Reachable::Both (true, true) => Reachable::Both,
} else if reaches_atlantic { (true, _) => Reachable::Pacific,
Reachable::Atlantic (_, true) => Reachable::Atlantic,
} else if reaches_pacific { (_, _) => Reachable::None,
Reachable::Pacific
} else {
Reachable::None
} }
} }
} }