diff --git a/shell.nix b/shell.nix index 3d1aed4..f5fd699 100644 --- a/shell.nix +++ b/shell.nix @@ -4,11 +4,10 @@ in with pkgs; mkShell { buildInputs = [ - cargo - rustc - rustfmt - rls - protobuf + pkgs.cargo + pkgs.rustc + pkgs.rustfmt + pkgs.rls ]; RUST_SRC_PATH= "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; diff --git a/src/main.rs b/src/main.rs index 5e3d6d7..6bb4ca6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,14 +3,12 @@ pub mod util; use util::lights::*; use std::sync::RwLock; use std::thread; -use candela::Pixel; pub const LED_SIZE: usize = 450; fn main() { - let mut p: Pixel = [0, 0, 0, 0]; - let lock = RwLock::new([p; LED_SIZE]); + let lock = RwLock::new([Color {r: 0, g: 0, b: 0}; LED_SIZE]); thread::spawn(move || loop { let lights = lock.read().unwrap(); run_lights(&lights);