fix: feature gate internal TransportBuilder::tls to avoid recursive call site (#1083)
This commit is contained in:
@@ -13,6 +13,7 @@ use super::{
|
|||||||
|
|
||||||
pub(crate) trait TransportBuilder {
|
pub(crate) trait TransportBuilder {
|
||||||
fn new<T: Into<String>>(server: T) -> Self;
|
fn new<T: Into<String>>(server: T) -> Self;
|
||||||
|
#[cfg(any(feature = "native-tls", feature = "rustls", feature = "boring-tls"))]
|
||||||
fn tls(self, tls: super::Tls) -> Self;
|
fn tls(self, tls: super::Tls) -> Self;
|
||||||
fn port(self, port: u16) -> Self;
|
fn port(self, port: u16) -> Self;
|
||||||
fn credentials(self, credentials: Credentials) -> Self;
|
fn credentials(self, credentials: Credentials) -> Self;
|
||||||
@@ -24,6 +25,7 @@ impl TransportBuilder for SmtpTransportBuilder {
|
|||||||
Self::new(server)
|
Self::new(server)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(any(feature = "native-tls", feature = "rustls", feature = "boring-tls"))]
|
||||||
fn tls(self, tls: super::Tls) -> Self {
|
fn tls(self, tls: super::Tls) -> Self {
|
||||||
self.tls(tls)
|
self.tls(tls)
|
||||||
}
|
}
|
||||||
@@ -47,6 +49,7 @@ impl TransportBuilder for AsyncSmtpTransportBuilder {
|
|||||||
Self::new(server)
|
Self::new(server)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(any(feature = "native-tls", feature = "rustls", feature = "boring-tls"))]
|
||||||
fn tls(self, tls: super::Tls) -> Self {
|
fn tls(self, tls: super::Tls) -> Self {
|
||||||
self.tls(tls)
|
self.tls(tls)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user