Variable rename
All checks were successful
Cargo CI / Build and Test (pull_request) Successful in 2m7s
Cargo CI / Lint (pull_request) Successful in 1m7s

This commit is contained in:
Wojciech Kozlowski 2025-01-05 11:01:40 +01:00
parent c842b1d98d
commit 1bcd1ba1e1

View File

@ -70,18 +70,18 @@ impl<Database, Library> IMusicHoardBasePrivate for MusicHoard<Database, Library>
} }
fn merge_collections<It: IntoIterator<Item = Artist>>(&self, database: It) -> Collection { fn merge_collections<It: IntoIterator<Item = Artist>>(&self, database: It) -> Collection {
let mut primary_map = NormalMap::<Artist>::new(); let mut primary = NormalMap::<Artist>::new();
let mut secondary_map = NormalMap::<Artist>::new(); let mut secondary = NormalMap::<Artist>::new();
for artist in self.library_cache.iter().cloned() { for artist in self.library_cache.iter().cloned() {
primary_map.insert(string::normalize_string(&artist.meta.id.name), artist); primary.insert(string::normalize_string(&artist.meta.id.name), artist);
} }
for artist in database.into_iter() { for artist in database.into_iter() {
secondary_map.insert(string::normalize_string(&artist.meta.id.name), artist); secondary.insert(string::normalize_string(&artist.meta.id.name), artist);
} }
let mut collection = MergeCollections::merge_by_name(primary_map, secondary_map); let mut collection = MergeCollections::merge_by_name(primary, secondary);
collection.sort_unstable(); collection.sort_unstable();
collection collection