s
This commit is contained in:
parent
dafac3d248
commit
96c50ae437
1 changed files with 2 additions and 2 deletions
|
@ -32,15 +32,15 @@ fn main() {
|
|||
});
|
||||
loop {
|
||||
thread::sleep(time::Duration::from_millis(250));
|
||||
let mut lights = lock.write().unwrap();
|
||||
let pattern = format_multiline("unit");
|
||||
let res: Result<Vec<Box<dyn Pattern>>> = pattern.iter()
|
||||
let res: Result<Vec<Box<dyn Pattern>>, ParseError> = pattern.iter()
|
||||
.map(|x: &Vec<String>| parse_line((*x).clone()))
|
||||
.collect();
|
||||
|
||||
if res.is_ok() {
|
||||
let v: Vec<Box<dyn Pattern>> = res.unwrap();
|
||||
for x in 0..v.len() {
|
||||
let mut lights = lock.write().unwrap();
|
||||
v[x].execute(&mut lights);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue