single scope again

This commit is contained in:
Zynh0722 2024-05-15 05:18:34 -07:00
parent c290afca3a
commit b3946f9131

View file

@ -29,12 +29,11 @@ fn main() -> Result<(), Box<dyn Error>> {
let args = Args::parse(); let args = Args::parse();
#[cfg(not(windows))] #[cfg(not(windows))]
let boot_folder = args let boot_folder = unsafe {
.boot_directory args.boot_directory
.or_else(|| PathBuf::from_str(BOOT_PATH).ok()); .or_else(|| PathBuf::from_str(BOOT_PATH).ok())
.unwrap_unchecked()
#[cfg(not(windows))] };
let boot_folder = unsafe { boot_folder.unwrap_unchecked() };
#[cfg(windows)] #[cfg(windows)]
let boot_folder = { let boot_folder = {