refactor: use is_ok() instead of !is_err() for XDG_CURRENT_DESKTOP

This commit is contained in:
Muhammad Nauman Raza 2024-03-31 18:51:28 +01:00
parent 63a7867c29
commit bfeedb4deb

View file

@ -63,7 +63,7 @@ fn main() {
let desktop = desktop_env().to_string();
if desktop != "Unknown: Unknown" {
wm = desktop;
} else if !xdg_current_desktop.is_err() {
} else if xdg_current_desktop.is_ok() {
wm = xdg_current_desktop.unwrap();
} else {
wm = "N/A".to_string();