mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-15 16:44:43 +01:00
Remove warnings
This commit is contained in:
@@ -10,14 +10,18 @@ mod proxy;
|
||||
|
||||
fn main() {
|
||||
tauri::Builder::default()
|
||||
.invoke_handler(tauri::generate_handler![run_program])
|
||||
.invoke_handler(tauri::generate_handler![downloader::download_file])
|
||||
.invoke_handler(tauri::generate_handler![run_program])
|
||||
.invoke_handler(tauri::generate_handler![connect, disconnect])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
async fn connect() {
|
||||
// Log message to console.
|
||||
println!("Connecting to proxy...");
|
||||
|
||||
// Create and start a proxy.
|
||||
proxy::create_proxy().await;
|
||||
|
||||
@@ -31,13 +35,8 @@ fn disconnect() {
|
||||
proxy::disconnect_from_proxy();
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn test() {
|
||||
println!("test");
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn run_program(path: String) {
|
||||
// Open the program from the specified path.
|
||||
opener::open(path.clone());
|
||||
opener::open(path.clone()).expect("Failed to open program");
|
||||
}
|
||||
Reference in New Issue
Block a user