Skip to content

Commit

Permalink
Rename feature tls -> _tls
Browse files Browse the repository at this point in the history
  • Loading branch information
algesten committed Jul 12, 2024
1 parent 4000748 commit 38b86bb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ features = ["rustls", "native-roots", "native-tls", "socks-proxy", "cookies"]

[features]
default = ["rustls", "native-roots", "native-tls", "socks-proxy", "cookies"]
rustls = ["dep:rustls", "tls"]
native-tls = ["dep:native-tls", "dep:der", "tls"]
tls = ["dep:rustls-pemfile", "dep:rustls-pki-types"]
rustls = ["dep:rustls", "_tls"]
native-tls = ["dep:native-tls", "dep:der", "_tls"]
native-roots = ["dep:rustls-native-certs"]
socks-proxy = ["dep:socks"]
cookies = ["dep:cookie_store", "_url"]

# Underscore prefixed features are internal
_url = ["dep:url"]
_tls = ["dep:rustls-pemfile", "dep:rustls-pki-types"]

[dependencies]
base64 = "0.22.1"
Expand Down
6 changes: 3 additions & 3 deletions src/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::unit::{Event, Input, Unit};
use crate::util::UriExt;
use crate::{Error, RequestBuilder, SendBody};

#[cfg(feature = "tls")]
#[cfg(feature = "_tls")]
use crate::tls::TlsConfig;

#[derive(Debug, Clone)]
Expand Down Expand Up @@ -135,7 +135,7 @@ pub struct AgentConfig {
/// Config for TLS.
///
/// This config is generic for all TLS connectors.
#[cfg(feature = "tls")]
#[cfg(feature = "_tls")]
pub tls_config: TlsConfig,
}

Expand All @@ -162,7 +162,7 @@ impl Default for AgentConfig {
max_idle_connections_per_host: 3,
max_idle_age: Duration::from_secs(15),

#[cfg(feature = "tls")]
#[cfg(feature = "_tls")]
tls_config: TlsConfig::with_native_roots(),
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mod util;
pub mod resolver;
pub mod transport;

#[cfg(feature = "tls")]
#[cfg(feature = "_tls")]
pub mod tls;

#[cfg(feature = "cookies")]
Expand Down

0 comments on commit 38b86bb

Please sign in to comment.