From d1fe53b99a44d9ffa4f1b21b13e8a686c30ceff8 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Mon, 30 Jul 2018 21:49:15 +0300 Subject: Duplicate all teh codez --- src/devices/fc0013.rs | 8 ++++---- src/devices/mod.rs | 2 +- src/devices/r820t.rs | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/devices') diff --git a/src/devices/fc0013.rs b/src/devices/fc0013.rs index 2af58fb..028c36b 100644 --- a/src/devices/fc0013.rs +++ b/src/devices/fc0013.rs @@ -1,7 +1,7 @@ -use super::{DeviceInfo, Actions}; +use super::{DeviceInfo, Device}; pub struct FC0013 { - device: DeviceInfo + pub device: DeviceInfo } pub const DEVICE_INFO: DeviceInfo = DeviceInfo { @@ -13,14 +13,14 @@ pub const DEVICE_INFO: DeviceInfo = DeviceInfo { }; impl FC0013 { - fn new() -> FC0013 { + pub fn new() -> FC0013 { FC0013 { device: DEVICE_INFO } } } -impl Actions for FC0013 { +impl Device for FC0013 { fn init(&self) { println!("Init {}", self.device.name); } diff --git a/src/devices/mod.rs b/src/devices/mod.rs index 450957d..05dd2a3 100644 --- a/src/devices/mod.rs +++ b/src/devices/mod.rs @@ -9,6 +9,6 @@ pub struct DeviceInfo { pub check_val: u8 } -pub trait Actions { +pub trait Device { fn init(&self); } diff --git a/src/devices/r820t.rs b/src/devices/r820t.rs index ffea7a0..fec572c 100644 --- a/src/devices/r820t.rs +++ b/src/devices/r820t.rs @@ -1,7 +1,7 @@ -use super::{DeviceInfo, Actions}; +use super::{DeviceInfo, Device}; pub struct R820T { - device: DeviceInfo + pub device: DeviceInfo } pub const DEVICE_INFO: DeviceInfo = DeviceInfo { @@ -13,14 +13,14 @@ pub const DEVICE_INFO: DeviceInfo = DeviceInfo { }; impl R820T { - fn new() -> R820T { + pub fn new() -> R820T { R820T { device: DEVICE_INFO } } } -impl Actions for R820T { +impl Device for R820T { fn init(&self) { println!("Init {}", self.device.name); } -- cgit v1.3.1