Skip to content

Commit 86b6656

Browse files
author
Sergey Armodin
committed
fix: simplify conditional structure in register_icon_theme_paths function
1 parent 69268f5 commit 86b6656

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ fn register_icon_theme_paths() {
101101
}
102102

103103
// Ensure installed packages (Flatpak/AppImage) can find their bundled icon assets.
104-
if let Ok(exe_path) = std::env::current_exe() {
105-
if let Some(prefix) = exe_path.parent().and_then(|path| path.parent()) {
106-
let share_icons = prefix.join("share/icons");
107-
if share_icons.exists() {
108-
theme.add_search_path(&share_icons);
109-
}
104+
if let Ok(exe_path) = std::env::current_exe()
105+
&& let Some(prefix) = exe_path.parent().and_then(|path| path.parent())
106+
{
107+
let share_icons = prefix.join("share/icons");
108+
if share_icons.exists() {
109+
theme.add_search_path(&share_icons);
110110
}
111111
}
112112
}

0 commit comments

Comments
 (0)