mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-12 15:14:35 +01:00
Auto-remove spaces from address
This commit is contained in:
@@ -41,7 +41,13 @@ struct ProxyHandler;
|
||||
|
||||
#[tauri::command]
|
||||
pub fn set_proxy_addr(addr: String) {
|
||||
*SERVER.lock().unwrap() = addr;
|
||||
if addr.contains(" ") {
|
||||
let addr2 = addr.replace(" ", "");
|
||||
*SERVER.lock().unwrap() = addr2;
|
||||
} else {
|
||||
*SERVER.lock().unwrap() = addr;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
|
||||
Reference in New Issue
Block a user