[rust] Box up the light grid

wip
Alpha Chen 9 years ago
parent 2e0e26f720
commit 0b2c48990b

@ -36,7 +36,7 @@ struct LightGrid {
impl LightGrid {
fn new() -> LightGrid {
LightGrid { grid: Box::new([false; 1_000 * 1_000]) }
LightGrid { grid: box [false; 1_000 * 1_000] }
}
fn turn_on(&mut self, rect: Rect) {
@ -148,6 +148,7 @@ impl<'a> Iterator for LightGridIterator<'a> {
}
}
#[derive(Debug)]
struct Instruction {
instruction: String,
rect: Rect,

@ -1,3 +1,5 @@
#![feature(box_syntax)]
extern crate crypto;
extern crate regex;

Loading…
Cancel
Save