From a052b6024cb29234296ac29183690c3c8ce15825 Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Sun, 31 Mar 2024 18:51:28 +0100 Subject: [PATCH] refactor: use is_ok() instead of !is_err() for XDG_CURRENT_DESKTOP --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index ba6bf23..c83a4e6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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();