From 544282a0b49d6ba2ac78b844c23415c0bf62a304 Mon Sep 17 00:00:00 2001 From: Pawan Singh Bisht <46450720+bishtpawan@users.noreply.github.com> Date: Wed, 17 Mar 2021 22:21:51 +0530 Subject: [PATCH] proxy: refactor a collapsible_match (#1214) --- src/proxy.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/proxy.rs b/src/proxy.rs index f2afabe..378b60c 100644 --- a/src/proxy.rs +++ b/src/proxy.rs @@ -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 }