add type coercion helper to ListItem objects

This commit is contained in:
Henrik Friedrichsen
2019-06-09 23:57:47 +02:00
parent b59e9b38e6
commit 96a0e9f9d6
5 changed files with 18 additions and 0 deletions

View File

@@ -107,6 +107,10 @@ impl ListItem for Playlist {
}
}
fn as_listitem(&self) -> Box<ListItem> {
Box::new(self.clone())
}
fn display_left(&self) -> String {
self.name.clone()
}