Commit 36a757df authored by Ralf's avatar Ralf
Browse files

fix all the warnings

parent dcf452fd
use std::time::Duration; use std::time::Duration;
use chan::{Receiver, Sender, async}; use chan::Receiver;
use util::timeout_chan; use util::timeout_chan;
use input::Event; use input::Event;
...@@ -67,7 +67,6 @@ impl Environment { ...@@ -67,7 +67,6 @@ impl Environment {
} }
} }
} }
unreachable!()
} }
fn handle_event(&mut self, fn handle_event(&mut self,
......
...@@ -11,7 +11,7 @@ use self::environment::*; ...@@ -11,7 +11,7 @@ use self::environment::*;
use self::event_handler::*; use self::event_handler::*;
use actors::Actor; use actors::Actor;
use input::Event; use input::Event;
use util::{Wakeable, Thread}; use util::Wakeable;
#[derive(Copy,Clone,Debug,PartialEq,Eq)] #[derive(Copy,Clone,Debug,PartialEq,Eq)]
enum LockAction { enum LockAction {
...@@ -29,10 +29,10 @@ trait State { ...@@ -29,10 +29,10 @@ trait State {
fn run(&mut self, Actors, &mut Environment) -> (Actors, Option<Box<State>>); fn run(&mut self, Actors, &mut Environment) -> (Actors, Option<Box<State>>);
} }
fn user_command_reject_handler(ev: Event) {} fn user_command_reject_handler(_: Event) {}
#[derive(Debug)] #[derive(Debug)]
struct UnLockingState { pub struct UnLockingState {
locking: bool, locking: bool,
} }
...@@ -41,7 +41,7 @@ impl State for UnLockingState { ...@@ -41,7 +41,7 @@ impl State for UnLockingState {
// TODO: abort if already locked // TODO: abort if already locked
let mut lock_actor = actors.lock_actor; // move out let mut lock_actor = actors.lock_actor; // move out
let locking = self.locking; let locking = self.locking;
for i in 0..3 { for _ in 0..3 {
let locker = Wakeable::new(move |t| { let locker = Wakeable::new(move |t| {
lock_actor.act(if locking { lock_actor.act(if locking {
LockAction::PressLock LockAction::PressLock
......
use std::thread; // While we are still prototyping, allow dead code
use std::thread::JoinHandle; #![allow(dead_code)]
use std::sync::{Arc, Mutex, Condvar, WaitTimeoutResult};
use std::time::Duration;
use std::io::Write;
#[macro_use] #[macro_use]
extern crate log; extern crate log;
......
...@@ -19,7 +19,7 @@ impl<T: Send + 'static> Wakeable<T> { ...@@ -19,7 +19,7 @@ impl<T: Send + 'static> Wakeable<T> {
} }
impl Thread { impl Thread {
pub fn sleep(&self, d: Duration) -> sync::WaitTimeoutResult { pub fn sleep(&self, _: Duration) -> sync::WaitTimeoutResult {
unimplemented!() unimplemented!()
} }
} }
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