refactor: simplify auto proxy disabling logic in clean_async function

This commit is contained in:
Tunglies
2025-10-06 18:26:01 +08:00
Unverified
parent b0decf824e
commit abb0df59df

View File

@@ -130,12 +130,9 @@ async fn clean_async() -> bool {
}
// 关闭自动代理配置
match Autoproxy::get_auto_proxy() {
Ok(mut autoproxy) => {
autoproxy.enable = false;
let _ = autoproxy.set_auto_proxy();
}
Err(_) => {}
if let Ok(mut autoproxy) = Autoproxy::get_auto_proxy() {
autoproxy.enable = false;
let _ = autoproxy.set_auto_proxy();
}
return true;