Compare commits
1 commit
b96f0d80db
...
cedae98d0f
Author | SHA1 | Date | |
---|---|---|---|
cedae98d0f |
1 changed files with 2 additions and 2 deletions
|
@ -41,7 +41,7 @@ impl<'a> Pattern<'a> for Value {
|
||||||
fn execute(&self, values: &'a mut RwLockWriteGuard<'_, [RawColor; crate::LED_SIZE]>) {
|
fn execute(&self, values: &'a mut RwLockWriteGuard<'_, [RawColor; crate::LED_SIZE]>) {
|
||||||
let mut v = *values;
|
let mut v = *values;
|
||||||
for i in 0..crate::LED_SIZE {
|
for i in 0..crate::LED_SIZE {
|
||||||
let mut color: RawColor = v[i];
|
let color: RawColor = v[i];
|
||||||
if self.r.is_some() {
|
if self.r.is_some() {
|
||||||
color[0] = self.r.unwrap();
|
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();
|
let res: Result<Box<dyn Pattern>, ParseError> = v.try_into();
|
||||||
res
|
res
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue