Fix Clone impl marked todo on Pagination

- Fixed a manual implementation of Clone on Pagination (needed extra
  trait bounds to be derivable)
- Made clippy happy :)
This commit is contained in:
Thomas
2022-10-19 22:02:39 +02:00
committed by GitHub
parent 05d221aada
commit 6a5efb1052
4 changed files with 6 additions and 17 deletions

View File

@@ -57,7 +57,7 @@ impl<I: ListItem> Scroller for ListView<I> {
}
}
impl<I: ListItem> ListView<I> {
impl<I: ListItem + Clone> ListView<I> {
pub fn new(content: Arc<RwLock<Vec<I>>>, queue: Arc<Queue>, library: Arc<Library>) -> Self {
let result = Self {
content,
@@ -178,7 +178,7 @@ impl<I: ListItem> ListView<I> {
}
}
impl<I: ListItem> View for ListView<I> {
impl<I: ListItem + Clone> View for ListView<I> {
fn draw(&self, printer: &Printer<'_, '_>) {
let content = self.content.read().unwrap();