Skip to content

Commit 58b4293

Browse files
fix: resolve clippy warnings in mount_detect and stats
Remove unnecessary u32 cast and collapse nested if statements. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7b326d7 commit 58b4293

2 files changed

Lines changed: 17 additions & 17 deletions

File tree

crates/mt-tauri/src/cache/mount_detect.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ mod macos {
4242
return false;
4343
}
4444
// If MNT_LOCAL is NOT set, the filesystem is remote
45-
(stat.f_flags as u32 & MNT_LOCAL) == 0
45+
(stat.f_flags & MNT_LOCAL) == 0
4646
}
4747
}
4848
}

crates/mt-tauri/src/commands/stats.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ fn load_system_font() -> Option<FontArc> {
3131
};
3232

3333
for path in candidates {
34-
if let Ok(data) = std::fs::read(path) {
35-
if let Ok(font) = FontArc::try_from_vec(data) {
36-
return Some(font);
37-
}
34+
if let Ok(data) = std::fs::read(path)
35+
&& let Ok(font) = FontArc::try_from_vec(data)
36+
{
37+
return Some(font);
3838
}
3939
}
4040
None
@@ -265,18 +265,18 @@ pub(crate) fn stats_generate_chart_grid(
265265
false
266266
};
267267

268-
if !has_artwork {
269-
if let Some(ref font) = font {
270-
draw_placeholder(
271-
&mut canvas,
272-
x_offset,
273-
y_offset,
274-
cell_size,
275-
&album.artist,
276-
&album.album,
277-
font,
278-
);
279-
}
268+
if !has_artwork
269+
&& let Some(ref font) = font
270+
{
271+
draw_placeholder(
272+
&mut canvas,
273+
x_offset,
274+
y_offset,
275+
cell_size,
276+
&album.artist,
277+
&album.album,
278+
font,
279+
);
280280
}
281281
}
282282

0 commit comments

Comments
 (0)