From 567c23922ce0a5f746362662ec829ce7acf10e39 Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Sun, 24 Mar 2024 14:13:36 +0000 Subject: [PATCH] hotfix: mismatched types --- src/main.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 3ab06ed..a760d5e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -41,14 +41,15 @@ fn main() { let kernel = System::kernel_version().unwrap_or(String::from("N/A")); let pretty = distro(); - let wm: &str; + + let wm: String; if cfg!(windows) { - wm = "Aero"; + wm = "Aero".to_string(); } else if cfg!(unix) { - wm = var("XDG_CURRENT_DESKTOP"); + wm = var("XDG_CURRENT_DESKTOP").unwrap(); } else { - wm = "N/A"; + wm = "N/A".to_string(); } println!();