diff --git a/src/main.rs b/src/main.rs index 8ad2ded..d2b986c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -32,12 +32,12 @@ fn main() { }); loop { thread::sleep(time::Duration::from_millis(250)); + let mut lights = lock.write().unwrap(); let pattern = format_multiline("val 255 150 0"); pattern.iter() .map(|x: &Vec| parse_line((*x).clone())) .for_each(|res: Result, ParseError>| { if res.is_ok() { - let mut lights = lock.write().unwrap(); res.unwrap().execute(&mut lights); } });