diff --git a/src/core/collection/album.rs b/src/core/collection/album.rs index a8b19c0..26a02fe 100644 --- a/src/core/collection/album.rs +++ b/src/core/collection/album.rs @@ -295,7 +295,10 @@ impl AsRef for AlbumId { impl AlbumId { pub fn new>(name: S) -> AlbumId { - AlbumId { title: name.into(), lib_id: AlbumLibId::None } + AlbumId { + title: name.into(), + lib_id: AlbumLibId::None, + } } } diff --git a/src/core/collection/artist.rs b/src/core/collection/artist.rs index 1c0e332..a627e5b 100644 --- a/src/core/collection/artist.rs +++ b/src/core/collection/artist.rs @@ -58,7 +58,7 @@ impl Artist { } fn merge_album_with_lib_id( - primary_albums: &mut Vec, + primary_albums: &mut [Album], mut secondary_album: Album, ) -> Option { if let lib_id @ AlbumLibId::Some(_) | lib_id @ AlbumLibId::Singleton = @@ -79,7 +79,7 @@ impl Artist { } fn merge_albums_with_lib_id( - primary_albums: &mut Vec, + primary_albums: &mut [Album], mut secondary_albums: Vec, ) -> HashMap> { let mut secondary_without_id = HashMap::>::new(); diff --git a/src/core/interface/library/mod.rs b/src/core/interface/library/mod.rs index aedbe01..190f728 100644 --- a/src/core/interface/library/mod.rs +++ b/src/core/interface/library/mod.rs @@ -1,6 +1,11 @@ //! Module for interacting with the music library. -use std::{collections::HashSet, fmt, num::ParseIntError, str::{ParseBoolError, Utf8Error}}; +use std::{ + collections::HashSet, + fmt, + num::ParseIntError, + str::{ParseBoolError, Utf8Error}, +}; #[cfg(test)] use mockall::automock; diff --git a/src/core/interface/library/testmod.rs b/src/core/interface/library/testmod.rs index 8650732..4e447c0 100644 --- a/src/core/interface/library/testmod.rs +++ b/src/core/interface/library/testmod.rs @@ -1,6 +1,9 @@ use once_cell::sync::Lazy; -use crate::{collection::album::AlbumLibId, core::{collection::track::TrackFormat, interface::library::Item}}; +use crate::{ + collection::album::AlbumLibId, + core::{collection::track::TrackFormat, interface::library::Item}, +}; pub static LIBRARY_ITEMS: Lazy> = Lazy::new(|| -> Vec { vec![ diff --git a/src/tui/ui/display.rs b/src/tui/ui/display.rs index 7a1ea54..b31da07 100644 --- a/src/tui/ui/display.rs +++ b/src/tui/ui/display.rs @@ -1,6 +1,7 @@ use musichoard::collection::{ album::{ - AlbumDate, AlbumId, AlbumLibId, AlbumMeta, AlbumPrimaryType, AlbumSecondaryType, AlbumSeq, AlbumStatus + AlbumDate, AlbumId, AlbumLibId, AlbumMeta, AlbumPrimaryType, AlbumSecondaryType, AlbumSeq, + AlbumStatus, }, artist::ArtistMeta, musicbrainz::{IMusicBrainzRef, MbRefOption}, diff --git a/tests/library/testmod.rs b/tests/library/testmod.rs index 295268d..36cd26d 100644 --- a/tests/library/testmod.rs +++ b/tests/library/testmod.rs @@ -1,6 +1,9 @@ use once_cell::sync::Lazy; -use musichoard::{collection::{album::AlbumLibId, track::TrackFormat}, interface::library::Item}; +use musichoard::{ + collection::{album::AlbumLibId, track::TrackFormat}, + interface::library::Item, +}; pub static LIBRARY_ITEMS: Lazy> = Lazy::new(|| -> Vec { vec![