fix some warnings

This commit is contained in:
Henrik Friedrichsen
2019-03-02 18:38:10 +01:00
parent 3d1673a7a4
commit 5a1c7dff69
2 changed files with 3 additions and 3 deletions

View File

@@ -33,12 +33,12 @@ impl EventManager {
} }
pub fn send(&self, event: Event) { pub fn send(&self, event: Event) {
self.tx.send(event); self.tx.send(event).expect("could not send event");
self.trigger(); self.trigger();
} }
pub fn trigger(&self) { pub fn trigger(&self) {
// send a no-op to trigger event loop processing // send a no-op to trigger event loop processing
self.cursive_sink.send(Box::new(|_s: &mut Cursive| {})); self.cursive_sink.send(Box::new(|_s: &mut Cursive| {})).expect("could not send no-op event to cursive");
} }
} }

View File

@@ -70,7 +70,7 @@ fn main() {
init_logger(logbuf); init_logger(logbuf);
let mut cursive = Cursive::default(); let mut cursive = Cursive::default();
let mut event_manager = EventManager::new(cursive.cb_sink().clone()); let event_manager = EventManager::new(cursive.cb_sink().clone());
cursive.add_global_callback('q', |s| s.quit()); cursive.add_global_callback('q', |s| s.quit());
cursive.set_theme(theme::default()); cursive.set_theme(theme::default());