From 330daa11731c7be13dff2c1ea24997ca62581409 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Sun, 17 Dec 2023 09:20:51 +0100 Subject: [PATCH] transport/smtp: Implement `Debug` trait (#925) --- src/transport/smtp/transport.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/transport/smtp/transport.rs b/src/transport/smtp/transport.rs index dd3a9a0..8acfcb4 100644 --- a/src/transport/smtp/transport.rs +++ b/src/transport/smtp/transport.rs @@ -1,6 +1,6 @@ #[cfg(feature = "pool")] use std::sync::Arc; -use std::time::Duration; +use std::{fmt::Debug, time::Duration}; #[cfg(feature = "pool")] use super::pool::sync_impl::Pool; @@ -38,6 +38,14 @@ impl Transport for SmtpTransport { } } +impl Debug for SmtpTransport { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut builder = f.debug_struct("SmtpTransport"); + builder.field("inner", &self.inner); + builder.finish() + } +} + impl SmtpTransport { /// Simple and secure transport, using TLS connections to communicate with the SMTP server ///