From de3ab006e2b344d81ee84c52ab9c84c1116e5184 Mon Sep 17 00:00:00 2001 From: Paolo Barbolini Date: Thu, 1 May 2025 15:09:07 +0200 Subject: [PATCH] fix: feature gate internal `TransportBuilder::tls` to avoid recursive call site (#1083) --- src/transport/smtp/connection_url.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/transport/smtp/connection_url.rs b/src/transport/smtp/connection_url.rs index eb2b121..aeccb39 100644 --- a/src/transport/smtp/connection_url.rs +++ b/src/transport/smtp/connection_url.rs @@ -13,6 +13,7 @@ use super::{ pub(crate) trait TransportBuilder { fn new>(server: T) -> Self; + #[cfg(any(feature = "native-tls", feature = "rustls", feature = "boring-tls"))] fn tls(self, tls: super::Tls) -> Self; fn port(self, port: u16) -> Self; fn credentials(self, credentials: Credentials) -> Self; @@ -24,6 +25,7 @@ impl TransportBuilder for SmtpTransportBuilder { Self::new(server) } + #[cfg(any(feature = "native-tls", feature = "rustls", feature = "boring-tls"))] fn tls(self, tls: super::Tls) -> Self { self.tls(tls) } @@ -47,6 +49,7 @@ impl TransportBuilder for AsyncSmtpTransportBuilder { Self::new(server) } + #[cfg(any(feature = "native-tls", feature = "rustls", feature = "boring-tls"))] fn tls(self, tls: super::Tls) -> Self { self.tls(tls) }