fix warnings and make clippy happy
This commit is contained in:
parent
ad3b3803ce
commit
22d007d938
@ -54,14 +54,15 @@ impl Conf {
|
||||
let mut v = vec![];
|
||||
for t in &self.transformers {
|
||||
let t : Box<dyn transformer::Transformers> = 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,
|
||||
|
@ -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<helios_dac::Point> = line.into_iter().map(|p| p.into()).collect();
|
||||
let frame = Frame::new(speed, points);
|
||||
let _frame = Frame::new(speed, points);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user