diff --git a/src/async_impl/client.rs b/src/async_impl/client.rs index 0a7281c42..f5ccb5f1d 100644 --- a/src/async_impl/client.rs +++ b/src/async_impl/client.rs @@ -197,7 +197,7 @@ impl ClientBuilder { connect_timeout: None, connection_verbose: false, pool_idle_timeout: Some(Duration::from_secs(90)), - pool_max_idle_per_host: std::usize::MAX, + pool_max_idle_per_host: usize::MAX, // TODO: Re-enable default duration once hyper's HttpConnector is fixed // to no longer error when an option fails. tcp_keepalive: None, //Some(Duration::from_secs(60)), diff --git a/src/async_impl/decoder.rs b/src/async_impl/decoder.rs index d742e6d35..3c82c921b 100644 --- a/src/async_impl/decoder.rs +++ b/src/async_impl/decoder.rs @@ -604,6 +604,7 @@ impl Accepts { } } +#[allow(clippy::derivable_impls)] impl Default for Accepts { fn default() -> Accepts { Accepts { diff --git a/src/dns/resolve.rs b/src/dns/resolve.rs index 6ecd3e08a..fe34ecdde 100644 --- a/src/dns/resolve.rs +++ b/src/dns/resolve.rs @@ -45,7 +45,7 @@ impl FromStr for Name { type Err = sealed::InvalidNameError; fn from_str(host: &str) -> Result { - HyperName::from_str(host.into()) + HyperName::from_str(host) .map(Name) .map_err(|_| sealed::InvalidNameError { _ext: () }) } diff --git a/src/into_url.rs b/src/into_url.rs index f1fdb49f7..5191181cb 100644 --- a/src/into_url.rs +++ b/src/into_url.rs @@ -63,7 +63,7 @@ impl<'a> IntoUrlSealed for &'a String { } } -impl<'a> IntoUrlSealed for String { +impl IntoUrlSealed for String { fn into_url(self) -> crate::Result { (&*self).into_url() } diff --git a/src/proxy.rs b/src/proxy.rs index 5be207a8a..adfcc45e0 100644 --- a/src/proxy.rs +++ b/src/proxy.rs @@ -140,14 +140,11 @@ impl IntoProxyScheme for S { let mut source = e.source(); while let Some(err) = source { if let Some(parse_error) = err.downcast_ref::() { - match parse_error { - url::ParseError::RelativeUrlWithoutBase => { - presumed_to_have_scheme = false; - break; - } - _ => {} + if *parse_error == url::ParseError::RelativeUrlWithoutBase { + presumed_to_have_scheme = false; + break; } - } else if let Some(_) = err.downcast_ref::() { + } else if err.downcast_ref::().is_some() { presumed_to_have_scheme = false; break; } @@ -459,10 +456,10 @@ impl NoProxy { /// * If neither environment variable is set, `None` is returned /// * Entries are expected to be comma-separated (whitespace between entries is ignored) /// * IP addresses (both IPv4 and IPv6) are allowed, as are optional subnet masks (by adding /size, - /// for example "`192.168.1.0/24`"). + /// for example "`192.168.1.0/24`"). /// * An entry "`*`" matches all hostnames (this is the only wildcard allowed) /// * Any other entry is considered a domain name (and may contain a leading dot, for example `google.com` - /// and `.google.com` are equivalent) and would match both that domain AND all subdomains. + /// and `.google.com` are equivalent) and would match both that domain AND all subdomains. /// /// For example, if `"NO_PROXY=google.com, 192.168.1.0/24"` was set, all of the following would match /// (and therefore would bypass the proxy): diff --git a/src/tls.rs b/src/tls.rs index 83f3feee8..ae6a3e68f 100644 --- a/src/tls.rs +++ b/src/tls.rs @@ -187,7 +187,7 @@ impl Certificate { Self::read_pem_certs(&mut reader)? .iter() - .map(|cert_vec| Certificate::from_der(&cert_vec)) + .map(|cert_vec| Certificate::from_der(cert_vec)) .collect::>>() } @@ -502,6 +502,7 @@ impl fmt::Debug for TlsBackend { } } +#[allow(clippy::derivable_impls)] impl Default for TlsBackend { fn default() -> TlsBackend { #[cfg(all(feature = "default-tls", not(feature = "http3")))]