mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-13 15:44:35 +01:00
Auto-remove spaces from address
This commit is contained in:
@@ -41,7 +41,13 @@ struct ProxyHandler;
|
|||||||
|
|
||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
pub fn set_proxy_addr(addr: String) {
|
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]
|
#[async_trait]
|
||||||
|
|||||||
Reference in New Issue
Block a user