fix deprecation warnings caused by old trait object syntax
This commit is contained in:
@@ -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)));
|
||||
|
||||
Reference in New Issue
Block a user