This commit is contained in:
jane 2021-12-28 21:46:48 -05:00
parent 10e71b6ccc
commit 66d5dba006
2 changed files with 3 additions and 3 deletions

View file

@ -51,6 +51,6 @@ fn main() {
//let mut lights = c_lock.write().unwrap();
p.execute(&mut lights, ticks);
}
ticks++;
ticks+= 1;
}
}

View file

@ -25,7 +25,7 @@ impl TryFrom<Vec<String>> for Box<dyn Pattern> {
struct Unit;
impl Pattern for Unit {
fn execute(&self, _values: &mut RwLockWriteGuard<'_, [RawColor; crate::LED_SIZE]>, ticks: u64) {}
fn execute(&self, _values: &mut RwLockWriteGuard<'_, [RawColor; crate::LED_SIZE]>, _ticks: u64) {}
fn parse(_args: Vec<String>) -> Result<Self, ParseError> {
Ok(Unit {})
}
@ -38,7 +38,7 @@ struct Value {
}
impl Pattern for Value {
fn execute(&self, values: &mut RwLockWriteGuard<'_, [RawColor; crate::LED_SIZE]>, ticks: u64) {
fn execute(&self, values: &mut RwLockWriteGuard<'_, [RawColor; crate::LED_SIZE]>, _ticks: u64) {
for i in 0..crate::LED_SIZE {
let mut color: RawColor = (*values)[i];
if self.r.is_some() {