Fix redundant method chains

This commit is contained in:
Kitaiti Makoto
2021-01-15 23:17:00 +09:00
parent 4cdc1a3655
commit 0775c8f3f9
3 changed files with 14 additions and 19 deletions
+1 -4
View File
@@ -303,9 +303,7 @@ fn get_proxy_config() -> Option<ProxyConfig> {
if only_domains.contains(domain)
|| only_domains
.iter()
.filter(|target| domain.ends_with(&format!(".{}", target)))
.next()
.is_some()
.any(|target| domain.ends_with(&format!(".{}", target)))
{
Some(proxy_url.clone())
} else {
@@ -317,7 +315,6 @@ fn get_proxy_config() -> Option<ProxyConfig> {
})
} else {
reqwest::Proxy::all(proxy_url)
.ok()
.expect("Invalid PROXY_URL")
};
Some(ProxyConfig {