Fix clippy warnings (#981)
* refactor: fix clippy warnings * refactor: fix redundant_closure * refactor: fix collapsible if * refactor: remove unnecessary_unwrap
This commit is contained in:
@@ -706,10 +706,8 @@ fn get_from_environment() -> SystemProxyMap {
|
||||
let mut proxies = HashMap::new();
|
||||
|
||||
if is_cgi() {
|
||||
if log::log_enabled!(log::Level::Warn) {
|
||||
if env::var_os("HTTP_PROXY").is_some() {
|
||||
log::warn!("HTTP_PROXY environment variable ignored in CGI");
|
||||
}
|
||||
if log::log_enabled!(log::Level::Warn) && env::var_os("HTTP_PROXY").is_some() {
|
||||
log::warn!("HTTP_PROXY environment variable ignored in CGI");
|
||||
}
|
||||
} else if !insert_from_env(&mut proxies, "http", "HTTP_PROXY") {
|
||||
insert_from_env(&mut proxies, "http", "http_proxy");
|
||||
|
||||
Reference in New Issue
Block a user