fix deprecation warnings caused by old trait object syntax

This commit is contained in:
Henrik Friedrichsen
2019-09-01 01:32:50 +02:00
parent 9a38eaa535
commit 7aa70fcb6b
10 changed files with 27 additions and 25 deletions

View File

@@ -17,12 +17,12 @@ pub struct ContextMenu {
}
enum ContextMenuAction {
ShowItem(Box<ListItem>),
ShowItem(Box<dyn ListItem>),
ShareUrl(String),
}
impl ContextMenu {
pub fn new(item: &Box<ListItem>, queue: Arc<Queue>, library: Arc<Library>) -> Self {
pub fn new(item: &Box<dyn ListItem>, queue: Arc<Queue>, library: Arc<Library>) -> Self {
let mut content: SelectView<ContextMenuAction> = SelectView::new().autojump();
if let Some(a) = item.artist() {
content.add_item("Show artist", ContextMenuAction::ShowItem(Box::new(a)));