mirror of
https://github.com/chatmail/core.git
synced 2026-04-27 02:16:29 +03:00
refactor: remove some .unwrap() calls
This commit is contained in:
@@ -1667,10 +1667,11 @@ impl MimeMessage {
|
||||
{
|
||||
let mut to_list =
|
||||
get_all_addresses_from_header(&report.headers, "x-failed-recipients");
|
||||
let to = if to_list.len() == 1 {
|
||||
Some(to_list.pop().unwrap())
|
||||
let to = if to_list.len() != 1 {
|
||||
// We do not know which recipient failed
|
||||
None
|
||||
} else {
|
||||
None // We do not know which recipient failed
|
||||
to_list.pop()
|
||||
};
|
||||
|
||||
return Ok(Some(DeliveryReport {
|
||||
|
||||
Reference in New Issue
Block a user