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

fix all the warnings

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