Reuse sorting methods
Some checks failed
Cargo CI / Build and Test (pull_request) Failing after 1m10s
Cargo CI / Lint (pull_request) Successful in 44s

This commit is contained in:
Wojciech Kozlowski 2024-01-14 10:17:04 +01:00
parent bd8dd8bae5
commit 67fb3fa54b

View File

@ -855,13 +855,8 @@ impl<LIB, DB> MusicHoard<LIB, DB> {
music_hoard_unique_url_dispatch!(qobuz);
fn sort(collection: &mut [Artist]) {
collection.sort_unstable();
for artist in collection.iter_mut() {
artist.albums.sort_unstable();
for album in artist.albums.iter_mut() {
album.tracks.sort_unstable();
}
}
Self::sort_artists(collection);
Self::sort_albums_and_tracks(collection);
}
fn sort_artists(collection: &mut [Artist]) {