fix some warnings
This commit is contained in:
@@ -33,12 +33,12 @@ impl EventManager {
|
||||
}
|
||||
|
||||
pub fn send(&self, event: Event) {
|
||||
self.tx.send(event);
|
||||
self.tx.send(event).expect("could not send event");
|
||||
self.trigger();
|
||||
}
|
||||
|
||||
pub fn trigger(&self) {
|
||||
// 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");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ fn main() {
|
||||
init_logger(logbuf);
|
||||
|
||||
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.set_theme(theme::default());
|
||||
|
||||
Reference in New Issue
Block a user