Clean up clippy warnings

This commit is contained in:
Henrik Friedrichsen
2022-04-27 22:41:04 +02:00
parent d1a44a613f
commit 0bbb4932e5
4 changed files with 4 additions and 6 deletions

View File

@@ -250,8 +250,7 @@ impl ListItem for Album {
.tracks
.as_ref()?
.iter()
.map(|t| t.id.as_deref())
.flatten()
.filter_map(|t| t.id.as_deref())
// spotify allows at max 5 seed items, so choose 4 random tracks...
.choose_multiple(&mut thread_rng(), MAX_SEEDS - 1);

View File

@@ -287,8 +287,7 @@ impl ListItem for Playlist {
.tracks
.as_ref()?
.iter()
.map(|t| t.id())
.flatten()
.filter_map(|t| t.id())
// only select unique tracks
.collect::<HashSet<_>>()
.into_iter()