diff --git a/src/main.rs b/src/main.rs index f169e2a..9c678d8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -24,7 +24,8 @@ fn main() { .build() .expect("Could not construct LED Controller."); loop { - let lights = lock.read().expect("Could not read array lock."); + let lock_c = Arc::clone(&lock); + let lights = lock_c.read().expect("Could not read array lock."); run_lights(&mut controller, &lights).expect("Error running lights controller."); } });