From 31c9785ed22c6d55ec8f4f7900887b92254c4e96 Mon Sep 17 00:00:00 2001 From: Connor Johnstone Date: Wed, 1 Apr 2026 22:54:44 -0400 Subject: [PATCH] fmt fix... --- shanty-playlist/tests/unit.rs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/shanty-playlist/tests/unit.rs b/shanty-playlist/tests/unit.rs index 0a2f06a..3c03163 100644 --- a/shanty-playlist/tests/unit.rs +++ b/shanty-playlist/tests/unit.rs @@ -91,17 +91,28 @@ fn test_score_tracks_basic() { // Matched tracks should score higher than unmatched ones let mut matched: Vec = scored .iter() - .filter(|t| t.title.as_deref().is_some_and(|n| n.starts_with("Song 1") || n.starts_with("Song 2") || n.starts_with("Song 3"))) + .filter(|t| { + t.title.as_deref().is_some_and(|n| { + n.starts_with("Song 1") || n.starts_with("Song 2") || n.starts_with("Song 3") + }) + }) .map(|t| t.score) .collect(); let mut unmatched: Vec = scored .iter() - .filter(|t| t.title.as_deref().is_some_and(|n| n.starts_with("Song 4") || n.starts_with("Song 5"))) + .filter(|t| { + t.title + .as_deref() + .is_some_and(|n| n.starts_with("Song 4") || n.starts_with("Song 5")) + }) .map(|t| t.score) .collect(); matched.sort_by(|a, b| b.partial_cmp(a).unwrap()); unmatched.sort_by(|a, b| b.partial_cmp(a).unwrap()); - assert!(matched[0] > unmatched[0], "matched tracks should score higher than unmatched"); + assert!( + matched[0] > unmatched[0], + "matched tracks should score higher than unmatched" + ); } #[test]