Compare commits

..

1 commit

Author SHA1 Message Date
cedae98d0f deref syntax? 2021-12-26 21:36:05 -05:00

View file

@ -41,7 +41,7 @@ impl<'a> Pattern<'a> for Value {
fn execute(&self, values: &'a mut RwLockWriteGuard<'_, [RawColor; crate::LED_SIZE]>) {
let mut v = *values;
for i in 0..crate::LED_SIZE {
let mut color: RawColor = v[i];
let color: RawColor = v[i];
if self.r.is_some() {
color[0] = self.r.unwrap();
}
@ -97,7 +97,7 @@ impl<'a> Pattern<'a> for Value {
}
}
pub fn parse_line(v: Vec<String>) -> Result<Box<dyn Pattern<'_>>, ParseError> {
pub fn parse_line(v: Vec<String>) -> Result<Box<dyn Pattern<'static>>, ParseError> {
let res: Result<Box<dyn Pattern>, ParseError> = v.try_into();
res
}