Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Hacksaar
rinx
Commits
bb1c8912
Commit
bb1c8912
authored
Feb 18, 2016
by
Ralf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change some imports around
parent
2abf701b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
src/actors/mod.rs
src/actors/mod.rs
+1
-3
src/input/mod.rs
src/input/mod.rs
+2
-1
src/util/mod.rs
src/util/mod.rs
+2
-2
No files found.
src/actors/mod.rs
View file @
bb1c8912
...
...
@@ -3,7 +3,7 @@
//! are various implementations of this trait: Some for testing (fake actors),
//! and some for actual production usage.
mod
fake
;
pub
mod
fake
;
/// The `Actor` trait defines the interface to act. It works for any
/// type `T` of the parameter describing the action.
...
...
@@ -12,5 +12,3 @@ pub trait Actor<T> {
fn
act
(
&
mut
self
,
t
:
T
);
}
// Re-export the public tyes
pub
use
self
::
fake
::
*
;
src/input/mod.rs
View file @
bb1c8912
...
...
@@ -2,6 +2,8 @@
//! 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.
pub
mod
fake
;
#[derive(Copy,Clone,Debug)]
pub
enum
Event
{
DoorLocked
(
bool
),
...
...
@@ -9,4 +11,3 @@ pub enum Event {
UserCommand
,
}
mod
fake
;
src/util/mod.rs
View file @
bb1c8912
pub
mod
wakeable
;
use
std
::
time
::
Duration
;
use
std
::
thread
;
use
chan
;
pub
mod
wakeable
;
pub
fn
timeout_chan
(
d
:
Duration
)
->
chan
::
Receiver
<
()
>
{
let
(
s
,
r
)
=
chan
::
sync
(
0
);
thread
::
spawn
(
move
||
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment