Fix compile issues.

This commit is contained in:
Kavin 2023-08-21 23:03:00 +01:00
parent 63953d283e
commit ef6250ba72
No known key found for this signature in database
GPG key ID: 6E4598CA5C92C41F

View file

@ -47,9 +47,9 @@ static CLIENT: Lazy<Client> = Lazy::new(|| {
None None
}; };
if proxy.is_some() { let builder = if proxy.is_some() {
// proxy basic auth // 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(); let proxy_auth_pass = env::var("PROXY_PASS").unwrap_or_default();
builder.proxy( builder.proxy(
proxy proxy
@ -58,8 +58,10 @@ static CLIENT: Lazy<Client> = Lazy::new(|| {
) )
} else { } else {
builder.proxy(proxy.unwrap()) builder.proxy(proxy.unwrap())
}; }
} } else {
builder
};
if env::var("IPV4_ONLY").is_ok() { if env::var("IPV4_ONLY").is_ok() {
builder builder