From b3946f9131bc518ba0bd24dff02e4ded34737ee7 Mon Sep 17 00:00:00 2001 From: Zynh0722 Date: Wed, 15 May 2024 05:18:34 -0700 Subject: [PATCH] single scope again --- src/main.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index a37092a..a4e3332 100644 --- a/src/main.rs +++ b/src/main.rs @@ -29,12 +29,11 @@ fn main() -> Result<(), Box> { let args = Args::parse(); #[cfg(not(windows))] - let boot_folder = args - .boot_directory - .or_else(|| PathBuf::from_str(BOOT_PATH).ok()); - - #[cfg(not(windows))] - let boot_folder = unsafe { boot_folder.unwrap_unchecked() }; + let boot_folder = unsafe { + args.boot_directory + .or_else(|| PathBuf::from_str(BOOT_PATH).ok()) + .unwrap_unchecked() + }; #[cfg(windows)] let boot_folder = {