From ef6250ba729f7aaeb3666ab9257f7720bf8f38f0 Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Mon, 21 Aug 2023 23:03:00 +0100 Subject: [PATCH] Fix compile issues. --- src/main.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 14877c7..5fc89a0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -47,9 +47,9 @@ static CLIENT: Lazy = Lazy::new(|| { None }; - if proxy.is_some() { + let builder = if proxy.is_some() { // proxy basic auth - let builder = if let Ok(proxy_auth_user) = env::var("PROXY_USER") { + if let Ok(proxy_auth_user) = env::var("PROXY_USER") { let proxy_auth_pass = env::var("PROXY_PASS").unwrap_or_default(); builder.proxy( proxy @@ -58,8 +58,10 @@ static CLIENT: Lazy = Lazy::new(|| { ) } else { builder.proxy(proxy.unwrap()) - }; - } + } + } else { + builder + }; if env::var("IPV4_ONLY").is_ok() { builder