fix deprecation warnings that occured due to cursive 0.14.0 upgrade

This commit is contained in:
Henrik Friedrichsen
2020-02-02 20:10:21 +01:00
parent 2039878144
commit 8924b85390
7 changed files with 37 additions and 31 deletions

View File

@@ -1,7 +1,7 @@
use std::sync::Arc;
use cursive::view::{View, ViewWrapper};
use cursive::views::IdView;
use cursive::views::NamedView;
use cursive::Cursive;
use album::Album;
@@ -49,7 +49,7 @@ pub trait ViewExt: View {
}
}
impl<V: ViewExt> ViewExt for IdView<V> {
impl<V: ViewExt> ViewExt for NamedView<V> {
fn on_command(&mut self, s: &mut Cursive, cmd: &Command) -> Result<CommandResult, String> {
self.with_view_mut(move |v| v.on_command(s, cmd)).unwrap()
}