Commit bb1c8912 authored by Ralf's avatar Ralf
Browse files

change some imports around

parent 2abf701b
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
//! are various implementations of this trait: Some for testing (fake actors), //! are various implementations of this trait: Some for testing (fake actors),
//! and some for actual production usage. //! and some for actual production usage.
mod fake; pub mod fake;
/// The `Actor` trait defines the interface to act. It works for any /// The `Actor` trait defines the interface to act. It works for any
/// type `T` of the parameter describing the action. /// type `T` of the parameter describing the action.
...@@ -12,5 +12,3 @@ pub trait Actor<T> { ...@@ -12,5 +12,3 @@ pub trait Actor<T> {
fn act(&mut self, t: T); fn act(&mut self, t: T);
} }
// Re-export the public tyes
pub use self::fake::*;
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
//! events from the sensors to the brain. Furthermore, there are a few //! events from the sensors to the brain. Furthermore, there are a few
//! types that can be sued to generate inputs from I2C bits, and for debugging. //! types that can be sued to generate inputs from I2C bits, and for debugging.
pub mod fake;
#[derive(Copy,Clone,Debug)] #[derive(Copy,Clone,Debug)]
pub enum Event { pub enum Event {
DoorLocked(bool), DoorLocked(bool),
...@@ -9,4 +11,3 @@ pub enum Event { ...@@ -9,4 +11,3 @@ pub enum Event {
UserCommand, UserCommand,
} }
mod fake;
pub mod wakeable;
use std::time::Duration; use std::time::Duration;
use std::thread; use std::thread;
use chan; use chan;
pub mod wakeable;
pub fn timeout_chan(d: Duration) -> chan::Receiver<()> { pub fn timeout_chan(d: Duration) -> chan::Receiver<()> {
let (s, r) = chan::sync(0); let (s, r) = chan::sync(0);
thread::spawn(move || { thread::spawn(move || {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment