refactor(library): various Rust style optimizations
Lots of small fixes to the APIs and functions in the `library` module, mostly following best practices outlined in the Rust library guidelines. Changes outside the `library` module were mostly required changes after changing function signatures.
This commit is contained in:
committed by
Henrik Friedrichsen
parent
97f10a9493
commit
7940365344
@@ -409,8 +409,7 @@ impl MprisPlayer {
|
||||
Some(UriType::Playlist) => {
|
||||
if let Some(p) = self.spotify.api.playlist(&id) {
|
||||
let mut playlist = Playlist::from(&p);
|
||||
let spotify = self.spotify.clone();
|
||||
playlist.load_tracks(spotify);
|
||||
playlist.load_tracks(&self.spotify);
|
||||
if let Some(tracks) = &playlist.tracks {
|
||||
let should_shuffle = self.queue.get_shuffle();
|
||||
self.queue.clear();
|
||||
|
||||
Reference in New Issue
Block a user