diff --git a/src/initiator.rs b/src/initiator.rs index a5cb2d2..8b57a3b 100644 --- a/src/initiator.rs +++ b/src/initiator.rs @@ -14,11 +14,14 @@ use crate::machine::{Machine, ReturnToken}; use crate::db::machine::MachineState; use crate::db::user::{User, UserId, UserData}; -use crate::registries::sensors::Sensor; use crate::network::InitMap; use crate::error::Result; +pub trait Sensor { + fn run_sensor(&mut self) -> BoxFuture<'static, (Option, MachineState)>; +} + type BoxSensor = Box; pub struct Initiator { diff --git a/src/main.rs b/src/main.rs index ce8f4a8..ec6091a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,7 +13,6 @@ mod api; mod config; mod error; mod connection; -mod registries; mod schema; mod db; mod machine; diff --git a/src/registries.rs b/src/registries.rs deleted file mode 100644 index 5743b51..0000000 --- a/src/registries.rs +++ /dev/null @@ -1 +0,0 @@ -pub mod sensors; diff --git a/src/registries/sensors.rs b/src/registries/sensors.rs deleted file mode 100644 index 718f2f9..0000000 --- a/src/registries/sensors.rs +++ /dev/null @@ -1,9 +0,0 @@ -use std::pin::Pin; -use futures::task::{Context, Poll}; -use futures::future::BoxFuture; -use crate::db::user::User; -use crate::db::machine::MachineState; - -pub trait Sensor { - fn run_sensor(&mut self) -> BoxFuture<'static, (Option, MachineState)>; -}