From 7ef06848cdd1c9ed4906790cf59b678a7e22c1bf Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Sun, 24 Mar 2024 14:06:23 +0000 Subject: [PATCH] chore: set default value to `wm` on define --- Cargo.lock | 2 +- src/main.rs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0f6c302..433bcb1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -64,7 +64,7 @@ checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" [[package]] name = "bunbun" -version = "1.0.0" +version = "1.1.0" dependencies = [ "clap", "colored", diff --git a/src/main.rs b/src/main.rs index 906909a..45f31b6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -41,14 +41,12 @@ fn main() { let kernel = System::kernel_version().unwrap_or(String::from("N/A")); let pretty = distro(); - let wm: &str; + let mut wm: &str = "N/A"; if cfg!(windows) { wm = "Aero"; } else if cfg!(unix) { wm = env!("XDG_CURRENT_DESKTOP"); - } else { - wm = "N/A"; } println!();