mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
Smtp.send: join recipients list without .collect
This commit is contained in:
committed by
link2xt
parent
ee27c7d9d4
commit
383c5ba7fd
@@ -5,6 +5,7 @@ use async_smtp::*;
|
||||
|
||||
use crate::context::Context;
|
||||
use crate::events::EventType;
|
||||
use itertools::Itertools;
|
||||
use std::time::Duration;
|
||||
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
@@ -33,11 +34,7 @@ impl Smtp {
|
||||
) -> Result<()> {
|
||||
let message_len_bytes = message.len();
|
||||
|
||||
let recipients_display = recipients
|
||||
.iter()
|
||||
.map(|x| format!("{}", x))
|
||||
.collect::<Vec<String>>()
|
||||
.join(",");
|
||||
let recipients_display = recipients.iter().map(|x| x.to_string()).join(",");
|
||||
|
||||
let envelope =
|
||||
Envelope::new(self.from.clone(), recipients).map_err(Error::EnvelopeError)?;
|
||||
|
||||
Reference in New Issue
Block a user