Skip to content

Commit 5d46f4c

Browse files
committed
cleanup
1 parent 286036c commit 5d46f4c

1 file changed

Lines changed: 10 additions & 13 deletions

File tree

‎src/smtp.rs‎

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -357,20 +357,17 @@ pub(crate) async fn smtp_send(
357357
warn!(context, "Unable to load SMTP job: {err:#}.");
358358
SendResult::Failure(err)
359359
}
360-
Ok(()) => SendResult::Success,
361-
};
362-
363-
if matches!(status, SendResult::Success) {
364-
debug_assert!(smtp.connection.is_some());
365-
if let Some(transport_id) = smtp.connection.as_ref().map(|conn| conn.transport_id)
366-
&& let Err(err) = record_success(context, transport_id).await
367-
{
368-
warn!(
369-
context,
370-
"Failed to record successful use of transport {transport_id} in smtp_success table: {err:#}."
371-
);
360+
Ok(()) => {
361+
let transport_id = connection.transport_id;
362+
if let Err(err) = record_success(context, transport_id).await {
363+
warn!(
364+
context,
365+
"Failed to record successful use of transport {transport_id} in smtp_success table: {err:#}."
366+
);
367+
}
368+
SendResult::Success
372369
}
373-
}
370+
};
374371

375372
if let SendResult::Failure(err) = &status
376373
&& let Some(msg_id) = msg_id

0 commit comments

Comments
 (0)