Simplify SQL statement

This commit is contained in:
Hocuri
2026-04-05 22:12:03 +02:00
parent a4fcb872f7
commit 0aaa3ba22f

View File

@@ -5640,18 +5640,11 @@ async fn test_mark_message_as_delivered_only_after_sent_out_fully() -> Result<()
pub(crate) async fn first_row_in_smtp_queue(alice: &TestContext) -> (MsgId, String) { pub(crate) async fn first_row_in_smtp_queue(alice: &TestContext) -> (MsgId, String) {
alice alice
.sql .sql
.query_row_optional( .query_row_optional("SELECT msg_id, mime FROM smtp ORDER BY id", (), |row| {
r#" let msg_id: MsgId = row.get(0)?;
SELECT id, msg_id, mime, recipients let mime: String = row.get(1)?;
FROM smtp Ok((msg_id, mime))
ORDER BY id"#, })
(),
|row| {
let msg_id: MsgId = row.get(1)?;
let mime: String = row.get(2)?;
Ok((msg_id, mime))
},
)
.await .await
.expect("query_row_optional failed") .expect("query_row_optional failed")
.expect("No SMTP row found") .expect("No SMTP row found")