From ada336d9459bc4fedf566b82e7f1afa0a292f80d Mon Sep 17 00:00:00 2001 From: Connor Johnstone Date: Wed, 1 Apr 2026 23:25:14 -0400 Subject: [PATCH] real fix for fmt,clippy --- shanty-playlist/src/scoring.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/shanty-playlist/src/scoring.rs b/shanty-playlist/src/scoring.rs index 4cf8119..a8004b9 100644 --- a/shanty-playlist/src/scoring.rs +++ b/shanty-playlist/src/scoring.rs @@ -85,17 +85,15 @@ pub fn score_tracks( } // Prefix match: local title starts with a top track name, or vice versa - if let Some(local) = title_lower.as_ref() { - if let Some((_, &pc)) = playcount_by_name + if let Some(local) = title_lower.as_ref() + && let Some((_, &pc)) = playcount_by_name .iter() .filter(|(top_name, _)| { - local.starts_with(top_name.as_str()) - || top_name.starts_with(local.as_str()) + local.starts_with(top_name.as_str()) || top_name.starts_with(local.as_str()) }) .max_by_key(|&(_, &pc)| pc) - { - consider(pc); - } + { + consider(pc); } let playcount = best_playcount;