proxy: refactor a collapsible_match (#1214)

This commit is contained in:
Pawan Singh Bisht
2021-03-17 22:21:51 +05:30
committed by GitHub
parent c666b293a1
commit 544282a0b4

View File

@@ -279,11 +279,8 @@ impl Proxy {
// Custom *may* match 'http', so assume so.
| Intercept::Custom(_) => true,
Intercept::System(ref system) => {
if let Some(proxy) = system.get("http") {
match proxy {
ProxyScheme::Http { auth, .. } => auth.is_some(),
_ => false,
}
if let Some(ProxyScheme::Http { auth, .. }) = system.get("http") {
auth.is_some()
} else {
false
}