[rust] Box up the light grid
change
commit 0b2c48990b40827a14d1914bcc76b26de592308c
author Alpha Chen <alpha.chen@gmail.com>
date
parent 2e0e26f7
diff --git a/rust/src/day_06.rs b/rust/src/day_06.rs
index d8fbd6d..8c9fa59 100644
--- a/rust/src/day_06.rs
+++ b/rust/src/day_06.rs
@@ -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,
diff --git a/rust/src/lib.rs b/rust/src/lib.rs
index 249280e..0b7055b 100644
--- a/rust/src/lib.rs
+++ b/rust/src/lib.rs
@@ -1,3 +1,5 @@
+#![feature(box_syntax)]
+
 extern crate crypto;
 extern crate regex;