don't re-parse every time
This commit is contained in:
parent
0dbc07cc94
commit
d394c3211c
1 changed files with 2 additions and 1 deletions
|
@ -36,8 +36,9 @@ fn pt2(input: &str) -> usize {
|
|||
}
|
||||
}
|
||||
|
||||
let board = Board::new(input);
|
||||
for loc in trace {
|
||||
board = Board::new(input);
|
||||
let mut board = board.clone();
|
||||
let mut steps = HashSet::new();
|
||||
board.set(loc, Cell::Obstacle);
|
||||
steps.insert(board.guard);
|
||||
|
|
Loading…
Reference in a new issue