File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
- use std:: sync:: Arc ;
2
-
3
1
use crate :: config;
4
2
use crate :: Env ;
5
3
use lettre:: address:: Envelope ;
@@ -48,7 +46,7 @@ impl Emails {
48
46
}
49
47
_ => {
50
48
let transport = FileTransport :: new ( "/tmp" ) ;
51
- EmailBackend :: FileSystem ( Arc :: new ( transport) )
49
+ EmailBackend :: FileSystem ( transport)
52
50
}
53
51
} ;
54
52
@@ -127,9 +125,11 @@ pub enum EmailError {
127
125
#[ derive( Debug , Clone ) ]
128
126
enum EmailBackend {
129
127
/// Backend used in production to send mails using SMTP.
128
+ ///
129
+ /// This is using `Box` to avoid a large size difference between variants.
130
130
Smtp ( Box < SmtpTransport > ) ,
131
131
/// Backend used locally during development, will store the emails in the provided directory.
132
- FileSystem ( Arc < FileTransport > ) ,
132
+ FileSystem ( FileTransport ) ,
133
133
/// Backend used during tests, will keep messages in memory to allow tests to retrieve them.
134
134
Memory ( StubTransport ) ,
135
135
}
You can’t perform that action at this time.
0 commit comments