inline toggle_box to eliminate bounds checking
This commit is contained in:
parent
816a3cbc3a
commit
b7d7b27566
|
@ -193,6 +193,7 @@ impl State {
|
|||
State { lvl }
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
fn toggle_box(&mut self, pos: &Pos) {
|
||||
self.lvl[*pos] = if self.lvl[*pos] == Cell::Goal(true) {
|
||||
Cell::Goal(false)
|
||||
|
|
Loading…
Reference in New Issue