1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-27 16:52:58 +01:00

chore(tls): clippy

This commit is contained in:
Rob Ede 2024-01-17 04:23:48 +00:00
parent d85903b31a
commit 079f0f66f0
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
3 changed files with 7 additions and 7 deletions

View File

@ -41,7 +41,7 @@ accept = []
connect = []
# use openssl impls
openssl = ["tls-openssl", "tokio-openssl"]
openssl = ["dep:tls-openssl", "dep:tokio-openssl"]
# alias for backwards compat
rustls = ["rustls-0_20"]
@ -61,10 +61,10 @@ rustls-0_22-webpki-roots = ["dep:tokio-rustls-025", "dep:rustls-pki-types-1", "d
rustls-0_22-native-roots = ["dep:tokio-rustls-025", "dep:rustls-pki-types-1", "dep:rustls-native-certs-07"]
# use native-tls impls
native-tls = ["tokio-native-tls"]
native-tls = ["dep:tokio-native-tls"]
# support http::Uri as connect address
uri = ["http", "http-1"]
uri = ["dep:http-0_2", "dep:http-1"]
[dependencies]
actix-rt = { version = "2.2", default-features = false }
@ -79,7 +79,7 @@ tokio-util = "0.7"
tracing = { version = "0.1.30", default-features = false, features = ["log"] }
# uri
http = { version = "0.2.3", optional = true }
http-0_2 = { package = "http", version = "0.2.3", optional = true }
http-1 = { package = "http", version = "1", optional = true }
# openssl

View File

@ -118,6 +118,7 @@ impl<R: Host> ConnectInfo<R> {
/// let mut addrs = conn.addrs();
/// assert_eq!(addrs.next().unwrap(), addr);
/// ```
#[allow(clippy::implied_bounds_in_impls)]
pub fn addrs(
&self,
) -> impl Iterator<Item = SocketAddr>
@ -149,6 +150,7 @@ impl<R: Host> ConnectInfo<R> {
/// let mut addrs = conn.take_addrs();
/// assert_eq!(addrs.next().unwrap(), addr);
/// ```
#[allow(clippy::implied_bounds_in_impls)]
pub fn take_addrs(
&mut self,
) -> impl Iterator<Item = SocketAddr>

View File

@ -1,8 +1,6 @@
use http as http_02;
use super::Host;
impl Host for http_02::Uri {
impl Host for http_0_2::Uri {
fn hostname(&self) -> &str {
self.host().unwrap_or("")
}