real fix for fmt,clippy
This commit is contained in:
@@ -85,17 +85,15 @@ pub fn score_tracks(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prefix match: local title starts with a top track name, or vice versa
|
// Prefix match: local title starts with a top track name, or vice versa
|
||||||
if let Some(local) = title_lower.as_ref() {
|
if let Some(local) = title_lower.as_ref()
|
||||||
if let Some((_, &pc)) = playcount_by_name
|
&& let Some((_, &pc)) = playcount_by_name
|
||||||
.iter()
|
.iter()
|
||||||
.filter(|(top_name, _)| {
|
.filter(|(top_name, _)| {
|
||||||
local.starts_with(top_name.as_str())
|
local.starts_with(top_name.as_str()) || top_name.starts_with(local.as_str())
|
||||||
|| top_name.starts_with(local.as_str())
|
|
||||||
})
|
})
|
||||||
.max_by_key(|&(_, &pc)| pc)
|
.max_by_key(|&(_, &pc)| pc)
|
||||||
{
|
{
|
||||||
consider(pc);
|
consider(pc);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let playcount = best_playcount;
|
let playcount = best_playcount;
|
||||||
|
|||||||
Reference in New Issue
Block a user