Skip to content

Commit

Permalink
chore(tls): clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed Jan 17, 2024
1 parent d85903b commit 079f0f6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions actix-tls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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 }
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions actix-tls/src/connect/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
4 changes: 1 addition & 3 deletions actix-tls/src/connect/uri.rs
Original file line number Diff line number Diff line change
@@ -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("")
}
Expand Down

0 comments on commit 079f0f6

Please sign in to comment.