mirror of
https://github.com/chatmail/relay.git
synced 2026-09-08 08:23:14 +00:00
refactor: Remove unnecessary Arc (#36)
`Arc` around handler configs are not needed, as they are not shared. Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
This commit is contained in:
committed by
GitHub
parent
47f16360a4
commit
8d18b73681
@@ -7,21 +7,18 @@ use crate::smtp_server::SmtpHandler;
|
||||
use async_trait::async_trait;
|
||||
use lettre::{AsyncSmtpTransport, AsyncTransport, Tokio1Executor};
|
||||
use mailparse::{MailHeaderMap, parse_mail};
|
||||
use std::sync::Arc;
|
||||
|
||||
pub use crate::smtp_server::Envelope;
|
||||
use crate::utils::{extract_address, format_smtp_error};
|
||||
|
||||
/// Handler for incoming SMTP messages.
|
||||
pub struct IncomingBeforeQueueHandler {
|
||||
config: Arc<Config>,
|
||||
config: Config,
|
||||
}
|
||||
|
||||
impl IncomingBeforeQueueHandler {
|
||||
pub fn new(config: Config) -> Self {
|
||||
Self {
|
||||
config: Arc::new(config),
|
||||
}
|
||||
Self { config }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user