From e5d151f5125ce63d869cbf83faedcd23b671b0e6 Mon Sep 17 00:00:00 2001 From: Thoronium <107363768+NotThorny@users.noreply.github.com> Date: Sat, 22 Apr 2023 17:08:39 -0600 Subject: [PATCH] Formatting For rustfmt --- src-tauri/src/system_helpers.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src-tauri/src/system_helpers.rs b/src-tauri/src/system_helpers.rs index 9197ba5..ff8bddf 100644 --- a/src-tauri/src/system_helpers.rs +++ b/src-tauri/src/system_helpers.rs @@ -12,10 +12,7 @@ use registry::{Data, Hive, Security}; pub fn run_program(path: String, args: Option) { // Without unwrap_or, this can crash when UAC prompt is denied match open::with( - format!( - "{} {}", - path, args.unwrap_or_else(|| "".into()) - ), + format!("{} {}", path, args.unwrap_or_else(|| "".into())), path.clone(), ) { Ok(_) => (), @@ -94,7 +91,8 @@ pub fn run_un_elevated(path: String, args: Option) { match open::with( format!( "cmd /min /C \"set __COMPAT_LAYER=RUNASINVOKER && start \"\" \"{}\"\" {}", - path, args.unwrap_or_else(|| "".into()) + path, + args.unwrap_or_else(|| "".into()) ), "C:\\Windows\\System32\\cmd.exe", ) {