Formatting

For rustfmt
This commit is contained in:
Thoronium
2023-04-22 17:08:39 -06:00
parent 361737c00d
commit e5d151f512

View File

@@ -12,10 +12,7 @@ use registry::{Data, Hive, Security};
pub fn run_program(path: String, args: Option<String>) { pub fn run_program(path: String, args: Option<String>) {
// Without unwrap_or, this can crash when UAC prompt is denied // Without unwrap_or, this can crash when UAC prompt is denied
match open::with( match open::with(
format!( format!("{} {}", path, args.unwrap_or_else(|| "".into())),
"{} {}",
path, args.unwrap_or_else(|| "".into())
),
path.clone(), path.clone(),
) { ) {
Ok(_) => (), Ok(_) => (),
@@ -94,7 +91,8 @@ pub fn run_un_elevated(path: String, args: Option<String>) {
match open::with( match open::with(
format!( format!(
"cmd /min /C \"set __COMPAT_LAYER=RUNASINVOKER && start \"\" \"{}\"\" {}", "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", "C:\\Windows\\System32\\cmd.exe",
) { ) {