Reuse sorting methods
This commit is contained in:
parent
bd8dd8bae5
commit
67fb3fa54b
@ -855,13 +855,8 @@ impl<LIB, DB> MusicHoard<LIB, DB> {
|
|||||||
music_hoard_unique_url_dispatch!(qobuz);
|
music_hoard_unique_url_dispatch!(qobuz);
|
||||||
|
|
||||||
fn sort(collection: &mut [Artist]) {
|
fn sort(collection: &mut [Artist]) {
|
||||||
collection.sort_unstable();
|
Self::sort_artists(collection);
|
||||||
for artist in collection.iter_mut() {
|
Self::sort_albums_and_tracks(collection);
|
||||||
artist.albums.sort_unstable();
|
|
||||||
for album in artist.albums.iter_mut() {
|
|
||||||
album.tracks.sort_unstable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn sort_artists(collection: &mut [Artist]) {
|
fn sort_artists(collection: &mut [Artist]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user