unsafe fn flash(&mut self, idx: usize) {
        self.flash_count += 1;

        self.flashed |= 1 << idx;
        *self.data.get_unchecked_mut(idx) = 0;
        if idx >= SIZE {
            self.queue.push_back(idx - SIZE);
            if idx % SIZE > 0 {
                self.queue.push_back(idx - SIZE - 1)
            }
            if idx % SIZE < SIZE - 1 {
                self.queue.push_back(idx - SIZE + 1)
            }
        }
        if idx < SIZE * (SIZE - 1) {
            self.queue.push_back(idx + SIZE);

            if idx % SIZE > 0 {
                self.queue.push_back(idx + SIZE - 1)
            }
            if idx % SIZE < SIZE - 1 {
                self.queue.push_back(idx + SIZE + 1)
            }
        }
        if idx % SIZE > 0 {
            self.queue.push_back(idx - 1)
        }
        if idx % SIZE < SIZE - 1 {
            self.queue.push_back(idx + 1)
        }
    }
// Only safe is called within the bounds
Only safe is called within the bounds
Only safe is called within the bounds
unsafe fn flash(&mut self, idx: usize) {
        self.flash_count += 1;
        self.flashed |= 1 << idx;
        *self.data.get_unchecked_mut(idx) = 0;
        if idx >= SIZE {
            self.queue.push_back(idx - SIZE);
            if idx % SIZE > 0 {
                self.queue.push_back(idx - SIZE - 1)
            }
            if idx % SIZE < SIZE - 1 {
                self.queue.push_back(idx - SIZE + 1)
            }
        }
        if idx < SIZE * (SIZE - 1) {
            self.queue.push_back(idx + SIZE);
            if idx % SIZE > 0 {
                self.queue.push_back(idx + SIZE - 1)
            }
            if idx % SIZE < SIZE - 1 {
                self.queue.push_back(idx + SIZE + 1)
            }
        }
        if idx % SIZE > 0 {
            self.queue.push_back(idx - 1)
        }
        if idx % SIZE < SIZE - 1 {
            self.queue.push_back(idx + 1)
        }
    }
unsafe fn flash ( & mut self , idx : usize ) { self . flash_count += 1 ; self . flashed |= 1 << idx ; * self . data . get_unchecked_mut ( idx ) = 0 ; if idx >= SIZE { self . queue . push_back ( idx - SIZE ) ; if idx % SIZE > 0 { self . queue . push_back ( idx - SIZE - 1 ) } if idx % SIZE < SIZE - 1 { self . queue . push_back ( idx - SIZE + 1 ) } } if idx < SIZE * ( SIZE - 1 ) { self . queue . push_back ( idx + SIZE ) ; if idx % SIZE > 0 { self . queue . push_back ( idx + SIZE - 1 ) } if idx % SIZE < SIZE - 1 { self . queue . push_back ( idx + SIZE + 1 ) } } if idx % SIZE > 0 { self . queue . push_back ( idx - 1 ) } if idx % SIZE < SIZE - 1 { self . queue . push_back ( idx + 1 ) } }
Only safe is called within the bounds
Only safe is called within the bounds
&mut self
idx
usize