mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-23 20:51:06 +01:00
chore(tls): clippy
This commit is contained in:
parent
d85903b31a
commit
079f0f66f0
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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("")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user