Skip to content

Commit 62165a4

Browse files
authored
email: Remove obsolete custom Debug impl (#7886)
1 parent ae93468 commit 62165a4

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

src/email.rs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ pub enum EmailError {
124124
TransportError(anyhow::Error),
125125
}
126126

127-
#[derive(Clone)]
127+
#[derive(Debug, Clone)]
128128
enum EmailBackend {
129129
/// Backend used in production to send mails using SMTP.
130130
Smtp(Box<SmtpTransport>),
@@ -146,23 +146,6 @@ impl EmailBackend {
146146
}
147147
}
148148

149-
// Custom Debug implementation to avoid showing the SMTP password.
150-
impl std::fmt::Debug for EmailBackend {
151-
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
152-
match self {
153-
EmailBackend::Smtp(_) => {
154-
// The password field is *intentionally* not included
155-
f.debug_tuple("Smtp").finish()?;
156-
}
157-
EmailBackend::FileSystem(transport) => {
158-
f.debug_tuple("FileSystem").field(transport).finish()?;
159-
}
160-
EmailBackend::Memory(transport) => f.debug_tuple("Memory").field(transport).finish()?,
161-
}
162-
Ok(())
163-
}
164-
}
165-
166149
#[derive(Debug, Clone)]
167150
pub struct StoredEmail {
168151
pub to: String,

0 commit comments

Comments
 (0)