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 121f41a6f2
commit b507fc535a
+2 -5
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
}