Fix clippy lints
This commit is contained in:
@@ -235,9 +235,7 @@ impl AgentBuilder {
|
||||
self.max_idle_connections_per_host,
|
||||
),
|
||||
#[cfg(feature = "cookies")]
|
||||
cookie_tin: CookieTin::new(
|
||||
self.cookie_store.unwrap_or_else(|| CookieStore::default()),
|
||||
),
|
||||
cookie_tin: CookieTin::new(self.cookie_store.unwrap_or_else(CookieStore::default)),
|
||||
resolver: self.resolver,
|
||||
}),
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ impl<'a> Payload<'a> {
|
||||
let encoding = Encoding::for_label(_charset.as_bytes())
|
||||
.or_else(|| Encoding::for_label(DEFAULT_CHARACTER_SET.as_bytes()))
|
||||
.unwrap();
|
||||
encoding.encode(&text).0
|
||||
encoding.encode(text).0
|
||||
};
|
||||
#[cfg(not(feature = "charset"))]
|
||||
let bytes = text.as_bytes();
|
||||
|
||||
@@ -599,8 +599,8 @@ fn get_socks5_stream(
|
||||
let stream = Socks5Stream::connect_with_password(
|
||||
proxy_addr,
|
||||
host_addr,
|
||||
&proxy.user.as_ref().unwrap(),
|
||||
&proxy.password.as_ref().unwrap(),
|
||||
proxy.user.as_ref().unwrap(),
|
||||
proxy.password.as_ref().unwrap(),
|
||||
)?
|
||||
.into_inner();
|
||||
Ok(stream)
|
||||
|
||||
@@ -89,7 +89,7 @@ impl Unit {
|
||||
}
|
||||
|
||||
#[cfg(feature = "cookies")]
|
||||
extra.extend(extract_cookies(agent, &url).into_iter());
|
||||
extra.extend(extract_cookies(agent, url).into_iter());
|
||||
|
||||
extra
|
||||
};
|
||||
@@ -289,7 +289,7 @@ fn connect_inner(
|
||||
|
||||
// squirrel away cookies
|
||||
#[cfg(feature = "cookies")]
|
||||
save_cookies(&unit, &resp);
|
||||
save_cookies(unit, &resp);
|
||||
|
||||
debug!("response {} to {} {}", resp.status(), method, url);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user