Fix all 16 clippy warnings

- Collapse else { if } blocks into else if (6 instances)
- Replace map_or(false, ...) with is_some_and(...) (6 instances)
- Replace iter().cloned().collect() with .to_vec() (2 instances)
- Replace manual char comparison with array pattern (1 instance)
- Replace useless vec! with array literal (1 instance)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-27 23:58:18 +00:00
parent 766614f5e9
commit 112f18582a
5 changed files with 62 additions and 76 deletions

View File

@@ -47,7 +47,7 @@ pub fn build_tree_items(state: &AppState) -> Vec<TreeItem> {
// If expanded, add albums sorted by year (oldest first)
if is_expanded {
if let Some(albums) = artists.albums_cache.get(&artist.id) {
let mut sorted_albums: Vec<Album> = albums.iter().cloned().collect();
let mut sorted_albums: Vec<Album> = albums.to_vec();
sorted_albums.sort_by(|a, b| {
// Albums with no year go last
match (a.year, b.year) {