ci: make clippy a hard gate
The advisory step existed because the tree carried a warning backlog. Measured on 1.97.1 — the pinned toolchain CI actually uses — that backlog is three warnings, not the ~51 the comment claimed: two unnecessary_sort_by in smart_cache and one redundant into_iter in offline. Fixed, so clippy now runs with -D warnings and a warning means new breakage. Worth recording why this took a toolchain pin to do safely: the same tree measured 0 warnings on 1.92.0 and 3 on 1.97.1. Flipping the flag on a local measurement, without the pin, would have reddened CI on the next push. TRACES: | DR-206
This commit is contained in:
@@ -187,7 +187,7 @@ pub async fn get_album_recommendations(
|
||||
}
|
||||
|
||||
// Sort by tracks played (descending)
|
||||
recommendations.sort_by(|a, b| b.tracks_played.cmp(&a.tracks_played));
|
||||
recommendations.sort_by_key(|r| std::cmp::Reverse(r.tracks_played));
|
||||
|
||||
Ok(recommendations)
|
||||
}
|
||||
@@ -224,7 +224,7 @@ pub fn get_album_affinity_status(
|
||||
.collect();
|
||||
|
||||
// Sort by play count (descending)
|
||||
statuses.sort_by(|a, b| b.unique_tracks_played.cmp(&a.unique_tracks_played));
|
||||
statuses.sort_by_key(|s| std::cmp::Reverse(s.unique_tracks_played));
|
||||
|
||||
Ok(statuses)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user