mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-23 16:21:06 +01:00
awc: gate TlsConnectorService behind any feature that uses it (#3350)
This commit is contained in:
parent
c1a6388614
commit
44f502e050
@ -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 New Issue
Block a user