File tree Expand file tree Collapse file tree 1 file changed +1
-18
lines changed Expand file tree Collapse file tree 1 file changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ pub enum EmailError {
124
124
TransportError ( anyhow:: Error ) ,
125
125
}
126
126
127
- #[ derive( Clone ) ]
127
+ #[ derive( Debug , Clone ) ]
128
128
enum EmailBackend {
129
129
/// Backend used in production to send mails using SMTP.
130
130
Smtp ( Box < SmtpTransport > ) ,
@@ -146,23 +146,6 @@ impl EmailBackend {
146
146
}
147
147
}
148
148
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
-
166
149
#[ derive( Debug , Clone ) ]
167
150
pub struct StoredEmail {
168
151
pub to : String ,
You can’t perform that action at this time.
0 commit comments