Skip to content

Commit

Permalink
Cut explicit panic
Browse files Browse the repository at this point in the history
  • Loading branch information
nickdrozd committed Jul 18, 2024
1 parent a9145cc commit ba0802b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,8 @@ impl<'p> Prover<'p> {
}
}

let Some(&(color, shift, next_state)) =
self.prog.get(&(state, tape.scan()))
else {
panic!();
};
let (color, shift, next_state) =
self.prog[&(state, tape.scan())];

tape.step(shift, color, state == next_state);

Expand Down

0 comments on commit ba0802b

Please sign in to comment.