From 59947749e35cab6371edd73ecdfcd9dbb8221f8d Mon Sep 17 00:00:00 2001 From: Rushmore Mushambi Date: Sat, 29 Apr 2023 18:21:19 +0200 Subject: [PATCH] Add a missing `impl IntoEndpoint for (T, native_tls::TlsConnector)` for the any engine (#1885) --- lib/src/api/engine/any/mod.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/src/api/engine/any/mod.rs b/lib/src/api/engine/any/mod.rs index 16b6d17a..c67b7019 100644 --- a/lib/src/api/engine/any/mod.rs +++ b/lib/src/api/engine/any/mod.rs @@ -140,6 +140,20 @@ impl IntoEndpoint for String { } } +#[cfg(feature = "native-tls")] +#[cfg_attr(docsrs, doc(cfg(feature = "native-tls")))] +impl IntoEndpoint for (T, native_tls::TlsConnector) +where + T: Into, +{ + fn into_endpoint(self) -> Result { + let (address, config) = self; + let mut address = address.into().into_endpoint()?; + address.tls_config = Some(Tls::Native(config)); + Ok(address) + } +} + #[cfg(feature = "rustls")] #[cfg_attr(docsrs, doc(cfg(feature = "rustls")))] impl IntoEndpoint for (T, rustls::ClientConfig)