mirror of
https://github.com/arabianq/pipewire-soundpad.git
synced 2026-04-28 06:21:23 +00:00
🧹 remove unsafe unwrap in file name parsing (#51)
Replaced an unsafe `.unwrap()` with `.unwrap_or_default()` in `src/gui/draw.rs` when parsing file names. This prevents potential panics on invalid paths. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a156df346b
commit
a948ea2dcd
+1
-1
@@ -711,7 +711,7 @@ impl SoundpadGui {
|
||||
for entry_path in files {
|
||||
let file_name = entry_path
|
||||
.file_name()
|
||||
.unwrap()
|
||||
.unwrap_or_default()
|
||||
.to_string_lossy()
|
||||
.to_string();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user