refactor: use is_ok() instead of !is_err() for XDG_CURRENT_DESKTOP
This commit is contained in:
parent
aa24c47e62
commit
a052b6024c
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ fn main() {
|
||||||
let desktop = desktop_env().to_string();
|
let desktop = desktop_env().to_string();
|
||||||
if desktop != "Unknown: Unknown" {
|
if desktop != "Unknown: Unknown" {
|
||||||
wm = desktop;
|
wm = desktop;
|
||||||
} else if !xdg_current_desktop.is_err() {
|
} else if xdg_current_desktop.is_ok() {
|
||||||
wm = xdg_current_desktop.unwrap();
|
wm = xdg_current_desktop.unwrap();
|
||||||
} else {
|
} else {
|
||||||
wm = "N/A".to_string();
|
wm = "N/A".to_string();
|
||||||
|
|
Loading…
Reference in a new issue