mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-13 15:44:35 +01:00
Formatting
For rustfmt
This commit is contained in:
@@ -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",
|
||||||
) {
|
) {
|
||||||
|
|||||||
Reference in New Issue
Block a user