From 001f0e2dfc145a3e3eca81861f0f10757d1c914d Mon Sep 17 00:00:00 2001 From: Wojciech Kozlowski Date: Sun, 21 May 2023 17:02:06 +0200 Subject: [PATCH] Lints --- src/lib.rs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 5868df8..fd84005 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -59,7 +59,7 @@ impl MusicBrainz { } match url.path_segments().and_then(|mut ps| ps.nth(1)) { - Some(segment) => Uuid::try_parse(&segment)?, + Some(segment) => Uuid::try_parse(segment)?, None => return Err(Self::invalid_url_error(url).into()), }; @@ -788,7 +788,10 @@ mod tests { let mut music_hoard = MusicHoard::new(library, database); music_hoard.rescan_library().unwrap(); - assert_eq!(music_hoard.get_collection(), &clean_collection(COLLECTION.to_owned())); + assert_eq!( + music_hoard.get_collection(), + &clean_collection(COLLECTION.to_owned()) + ); } #[test] @@ -812,7 +815,10 @@ mod tests { let mut music_hoard = MusicHoard::new(library, database); music_hoard.rescan_library().unwrap(); - assert_eq!(music_hoard.get_collection(), &clean_collection(COLLECTION.to_owned())); + assert_eq!( + music_hoard.get_collection(), + &clean_collection(COLLECTION.to_owned()) + ); } #[test] @@ -884,7 +890,10 @@ mod tests { let mut music_hoard = MusicHoard::new(library, database); music_hoard.rescan_library().unwrap(); - assert_eq!(music_hoard.get_collection(), &clean_collection(COLLECTION.to_owned())); + assert_eq!( + music_hoard.get_collection(), + &clean_collection(COLLECTION.to_owned()) + ); music_hoard.save_to_database().unwrap(); }