day10 part1 clippied

This commit is contained in:
Dylan Thies
2023-12-12 00:23:13 -05:00
parent d95c567319
commit 814ec6286e

View File

@@ -96,8 +96,8 @@ impl Pipe {
.collect() .collect()
} }
fn next(&self, from: PipeFrom) -> IVec2 { fn next(&self, from: PipeFrom) -> IVec2 {
use PipeFrom::*; use PipeFrom::{Down, Left, Right, Up};
use PipeType::*; use PipeType::{DownLeft, DownRight, Horizontal, UpLeft, UpRight, Vertical};
match (from, self.pipe_type) { match (from, self.pipe_type) {
(Up, Vertical) | (Left, DownLeft) | (Right, DownRight) => Down, (Up, Vertical) | (Left, DownLeft) | (Right, DownRight) => Down,
(Up, UpLeft) | (Down, DownLeft) | (Right, Horizontal) => Left, (Up, UpLeft) | (Down, DownLeft) | (Right, Horizontal) => Left,