remove obsolete events and callbacks

This commit is contained in:
Henrik Friedrichsen
2019-03-17 22:14:59 +01:00
parent 2d5fa1e67f
commit 9842b89457
6 changed files with 7 additions and 35 deletions

View File

@@ -16,7 +16,6 @@ pub struct CommandManager {
commands:
HashMap<String, Box<dyn Fn(&mut Cursive, Vec<String>) -> Result<Option<String>, String>>>,
aliases: HashMap<String, String>,
callbacks: Vec<Box<dyn Fn() -> ()>>,
}
impl CommandManager {
@@ -24,7 +23,6 @@ impl CommandManager {
CommandManager {
commands: HashMap::new(),
aliases: HashMap::new(),
callbacks: Vec::new(),
}
}
@@ -325,14 +323,6 @@ impl CommandManager {
v.set_error(e);
});
}
for cb in &self.callbacks {
cb();
}
}
pub fn register_callback(&mut self, cb: Box<dyn Fn() -> ()>) {
self.callbacks.push(cb);
}
pub fn register_keybinding<'a, E: Into<cursive::event::Event>, S: Into<String>>(