Skip to content

Commit

Permalink
Use rustls name directly
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto committed Feb 13, 2025
1 parent 17d5e4d commit e1d5a45
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ multipart = { version = "0.18.0", default-features = false, features = [
], optional = true }
native-tls = { version = "0.2.10", optional = true }
rustls-native-certs = { version = "0.8.1", optional = true }
rustls-opt-dep = { package = "rustls", version = "0.23.22", default-features = false, features = [
rustls = { version = "0.23.22", default-features = false, features = [
"ring",
"std",
"tls12",
Expand All @@ -54,7 +54,7 @@ lazy_static = "1.4.0"
multipart = { version = "0.18.0", default-features = false, features = [
"server",
] }
rustls-opt-dep = { package = "rustls", version = "0.23.22", default-features = false, features = [
rustls = { version = "0.23.22", default-features = false, features = [
"ring",
"std",
"tls12",
Expand Down Expand Up @@ -86,7 +86,7 @@ rustls = ["tls-rustls-webpki-roots"]
tls-rustls = ["tls-rustls-webpki-roots"]
tls-vendored = ["tls-native-vendored"]
# Internal feature used to indicate rustls support
__rustls = ["rustls-opt-dep"]
__rustls = ["dep:rustls"]

[package.metadata.docs.rs]
all-features = true
Expand Down
3 changes: 0 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@
//! ```
//!
#[cfg(feature = "__rustls")]
extern crate rustls_opt_dep as rustls;

macro_rules! debug {
($($arg:tt)+) => { log::debug!(target: "attohttpc", $($arg)+) };
}
Expand Down
2 changes: 1 addition & 1 deletion tests/tools/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ async fn tunnel(upgraded: Upgraded, addr: String) -> std::io::Result<()> {
}

async fn create_proxy(tls: bool, deny: bool) -> anyhow::Result<u16> {
let _ = rustls_opt_dep::crypto::ring::default_provider().install_default();
let _ = rustls::crypto::ring::default_provider().install_default();
let addr = SocketAddr::from(([127, 0, 0, 1], 0));
let listener = TcpListener::bind(addr).await?;
let port = listener.local_addr().unwrap().port();
Expand Down

0 comments on commit e1d5a45

Please sign in to comment.