quick fmt

This commit is contained in:
SpikeHD
2023-04-21 12:49:09 -07:00
parent 829b9822cb
commit 5480af7835
2 changed files with 5 additions and 9 deletions

View File

@@ -41,8 +41,8 @@ struct ProxyHandler;
#[tauri::command]
pub fn set_proxy_addr(addr: String) {
if addr.contains(" ") {
let addr2 = addr.replace(" ", "");
if addr.contains(' ') {
let addr2 = addr.replace(' ', "");
*SERVER.lock().unwrap() = addr2;
} else {
*SERVER.lock().unwrap() = addr;
@@ -93,11 +93,7 @@ impl HttpHandler for ProxyHandler {
async fn should_intercept(&mut self, _ctx: &HttpContext, _req: &Request<Body>) -> bool {
let uri = _req.uri().to_string();
if uri.contains("hoyoverse.com") || uri.contains("mihoyo.com") || uri.contains("yuanshen.com") {
true
} else {
false
}
uri.contains("hoyoverse.com") || uri.contains("mihoyo.com") || uri.contains("yuanshen.com")
}
}