Compare commits

..

1 commit

Author SHA1 Message Date
d3bd1fee20 move parse out of loop 2021-12-28 15:44:45 -05:00

View file

@ -30,8 +30,8 @@ fn main() {
run_lights(&mut controller, &lights).expect("Error running lights controller.");
}
});
let pattern = format_multiline("unit");
let res: Result<Vec<Box<dyn Pattern>>, ParseError> = pattern.iter()
let mul_string = format_multiline("unit");
let res: Result<Vec<Box<dyn Pattern>>, ParseError> = mul_string.iter()
.map(|x: &Vec<String>| parse_line((*x).clone()))
.collect();
if res.is_ok() {