diff --git a/src/conf.rs b/src/conf.rs index 781bcaa..02a4c15 100644 --- a/src/conf.rs +++ b/src/conf.rs @@ -54,14 +54,15 @@ impl Conf { let mut v = vec![]; for t in &self.transformers { let t : Box = match t { - TransformConf::Translate(t) => Box::new(t.clone()), - TransformConf::Replicate(r) => Box::new(r.clone()) + TransformConf::Translate(t) => Box::new(*t), + TransformConf::Replicate(r) => Box::new(*r) }; v.push(t); } v } - + + #[allow(dead_code)] pub fn dump() { let conf = Conf { laser_id: 0, debug: true, diff --git a/src/device/helios.rs b/src/device/helios.rs index e1b8efc..8b0fc88 100644 --- a/src/device/helios.rs +++ b/src/device/helios.rs @@ -5,10 +5,10 @@ use helios_dac::{NativeHeliosDac, NativeHeliosDacController}; use helios_dac::{ // Coordinate, - Color, + // Color, DeviceStatus, Frame, - Point as HeliosPoint, + // Point as HeliosPoint, }; use crate::conf::HeliosConf; use crate::device::{Device, Status}; @@ -35,11 +35,11 @@ impl HeliosDevice { impl Device for HeliosDevice { fn status(&self) -> Status { - return Status { + Status { active: true, last_traced_at: "now".to_string(), properties: vec!["foo".to_string()], - }; + } } fn draw(&self, @@ -49,7 +49,7 @@ impl Device for HeliosDevice { while let Ok(DeviceStatus::NotReady) = self.dac.status() {} let points: Vec = line.into_iter().map(|p| p.into()).collect(); - let frame = Frame::new(speed, points); + let _frame = Frame::new(speed, points); Ok(()) } diff --git a/src/device/mod.rs b/src/device/mod.rs index 70a3916..9f4455b 100644 --- a/src/device/mod.rs +++ b/src/device/mod.rs @@ -2,7 +2,7 @@ use crate::point::Point; mod helios; -use crate::conf::{Conf, DacFamily, EtherDreamConf, HeliosConf}; +use crate::conf::{Conf, DacFamily, /*EtherDreamConf, HeliosConf*/}; use crate::device::helios::HeliosDevice; use crate::errors::LJResult; diff --git a/src/main.rs b/src/main.rs index 7debd47..cb05855 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,7 +16,7 @@ use redis_ctrl::{RedisCtrl, Order}; use conf::Conf; use errors::LJResult; use point::Point; -use transformer::{Transformers, Translate, Replicate}; +use transformer::Transformers; use log::{LevelFilter, info, /* warn, */ error}; use env_logger::Builder;