Configure and run rustfmt

This commit is contained in:
Brian Bowman
2022-07-11 04:40:28 -05:00
parent 4d05063b61
commit e41a89b26c
10 changed files with 139 additions and 102 deletions

View File

@@ -10,8 +10,7 @@ pub fn run_program(path: String) {
#[tauri::command]
pub fn run_command(program: &str, args: Vec<&str>) {
cmd(program, args).run()
.expect("Failed to run command");
cmd(program, args).run().expect("Failed to run command");
}
#[tauri::command]
@@ -23,7 +22,10 @@ pub fn run_jar(path: String, execute_in: String, java_path: String) {
};
// Open the program from the specified path.
match open::with(format!("/k cd /D \"{}\" & {}", &execute_in, &command), "C:\\Windows\\System32\\cmd.exe") {
match open::with(
format!("/k cd /D \"{}\" & {}", &execute_in, &command),
"C:\\Windows\\System32\\cmd.exe",
) {
Ok(_) => (),
Err(e) => println!("Failed to open jar ({} from {}): {}", &path, &execute_in, e),
};
@@ -38,7 +40,6 @@ pub fn open_in_browser(url: String) {
};
}
#[tauri::command]
pub fn install_location() -> String {
let mut exe_path = std::env::current_exe().unwrap();