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 aa24c47e62
commit a052b6024c
Signed by: devraza
GPG key ID: 91EAD6081011574B

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();