diff rust/src/fridge.rs @ 609:7bda01659426 rust

not building, paramwaiter work
author Matt Johnston <matt@ucc.asn.au>
date Sat, 18 Feb 2017 00:21:10 +0800
parents 3c1d37d78415
children f3e39e2107fd
line wrap: on
line diff
--- a/rust/src/fridge.rs	Fri Feb 17 23:07:33 2017 +0800
+++ b/rust/src/fridge.rs	Sat Feb 18 00:21:10 2017 +0800
@@ -68,7 +68,7 @@
             wort_valid_time: Instant::now() - Duration::new(config.FRIDGE_WORT_INVALID_TIME, 100),
         };
         if nowait {
-            f.last_off_time -= Duration::new(config.FRIDGE_DELAY, 100);
+            f.last_off_time -= Duration::new(config.FRIDGE_DELAY, 1);
         }
         f.tick();
         f
@@ -125,15 +125,13 @@
         self.handle.spawn(t);
     }
 
-    fn process_msg(&mut self, msg: Message)
-            -> Box<Future<Item=(), Error=()>> {
+    fn process_msg(&mut self, msg: Message) {
         debug!("process_msg {:?}", msg);
         match msg {
             Message::Sensor{wort, fridge} => self.update_sensor(wort, fridge),
             Message::Params(p) => self.update_params(p),
             Message::Tick(v) => if v == self.ticker {self.tick()}, // schedule a timeout if there are none pending
         };
-        future::ok::<(),()>(()).boxed()
     }
 
     pub fn update_params(&mut self, p: Params) {