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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user