mirror of
https://github.com/actix/actix-web.git
synced 2024-11-22 09:31:10 +00:00
awc: gate TlsConnectorService behind any feature that uses it (#3350)
This commit is contained in:
parent
c1a6388614
commit
44f502e050
2 changed files with 17 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
|||
## Unreleased
|
||||
|
||||
- Minimum supported Rust version (MSRV) is now 1.72.
|
||||
- Fix warning on 1.78 due to unused TlsConnectorService struct
|
||||
|
||||
## 3.4.0
|
||||
|
||||
|
|
|
@ -649,6 +649,14 @@ where
|
|||
|
||||
/// service for establish tcp connection and do client tls handshake.
|
||||
/// operation is canceled when timeout limit reached.
|
||||
#[cfg(any(
|
||||
feature = "dangerous-h2c",
|
||||
feature = "openssl",
|
||||
feature = "rustls-0_20",
|
||||
feature = "rustls-0_21",
|
||||
feature = "rustls-0_22-webpki-roots",
|
||||
feature = "rustls-0_22-native-roots",
|
||||
))]
|
||||
struct TlsConnectorService<Tcp, Tls> {
|
||||
/// TCP connection is canceled on `TcpConnectorInnerService`'s timeout setting.
|
||||
tcp_service: Tcp,
|
||||
|
@ -659,6 +667,14 @@ struct TlsConnectorService<Tcp, Tls> {
|
|||
timeout: Duration,
|
||||
}
|
||||
|
||||
#[cfg(any(
|
||||
feature = "dangerous-h2c",
|
||||
feature = "openssl",
|
||||
feature = "rustls-0_20",
|
||||
feature = "rustls-0_21",
|
||||
feature = "rustls-0_22-webpki-roots",
|
||||
feature = "rustls-0_22-native-roots",
|
||||
))]
|
||||
impl<Tcp, Tls, IO> Service<Connect> for TlsConnectorService<Tcp, Tls>
|
||||
where
|
||||
Tcp:
|
||||
|
|
Loading…
Reference in a new issue