chore: nightly clippy fixes

This commit is contained in:
link2xt
2023-07-10 01:43:34 +00:00
committed by holger krekel
parent d2b15cb629
commit 31e3169433
11 changed files with 38 additions and 37 deletions

View File

@@ -643,7 +643,7 @@ impl MimeMessage {
.parts
.iter_mut()
.find(|part| !part.msg.is_empty() && !part.is_reaction);
if let Some(mut part) = part_with_text {
if let Some(part) = part_with_text {
part.msg = format!("{} {}", subject, part.msg);
}
}
@@ -2062,7 +2062,8 @@ async fn handle_mdn(
Ok((msg_id, chat_id, msg_state))
},
)
.await? else {
.await?
else {
info!(
context,
"Ignoring MDN, found no message with Message-ID {rfc724_mid:?} sent by us in the database.",
@@ -3089,7 +3090,7 @@ CWt6wx7fiLp0qS9RrX75g6Gqw7nfCs6EcBERcIPt7DTe8VStJwf3LWqVwxl4gQl46yhfoqwEO+I=
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn parse_outlook_html_embedded_image() {
let context = TestContext::new_alice().await;
let raw = br##"From: Anonymous <anonymous@example.org>
let raw = br#"From: Anonymous <anonymous@example.org>
To: Anonymous <anonymous@example.org>
Subject: Delta Chat is great stuff!
Date: Tue, 5 May 2020 01:23:45 +0000
@@ -3144,7 +3145,7 @@ K+TuvC7qOah0WLFhcsXWn2+dDV1bXuAeC769TkqkpHhdXfUHnVgK3Pv7u3rVPT5AMeFUGxRB2dP4
CWt6wx7fiLp0qS9RrX75g6Gqw7nfCs6EcBERcIPt7DTe8VStJwf3LWqVwxl4gQl46yhfoqwEO+I=
------=_NextPart_000_0003_01D622B3.CA753E60--
"##;
"#;
let message = MimeMessage::from_bytes(&context.ctx, &raw[..], None)
.await
@@ -3519,7 +3520,7 @@ On 2020-10-25, Bob wrote:
// A message with a long Message-ID.
// Long message-IDs are generated by Mailjet.
let raw = br###"Date: Thu, 28 Jan 2021 00:26:57 +0000
let raw = br"Date: Thu, 28 Jan 2021 00:26:57 +0000
Chat-Version: 1.0\n\
Message-ID: <ABCDEFGH.1234567_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA@mailjet.com>
To: Bob <bob@example.org>
@@ -3527,11 +3528,11 @@ From: Alice <alice@example.org>
Subject: ...
Some quote.
"###;
";
receive_imf(&t, raw, false).await?;
// Delta Chat generates In-Reply-To with a starting tab when Message-ID is too long.
let raw = br###"In-Reply-To:
let raw = br"In-Reply-To:
<ABCDEFGH.1234567_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA@mailjet.com>
Date: Thu, 28 Jan 2021 00:26:57 +0000
Chat-Version: 1.0\n\
@@ -3543,7 +3544,7 @@ Subject: ...
> Some quote.
Some reply
"###;
";
receive_imf(&t, raw, false).await?;
@@ -3561,7 +3562,7 @@ Some reply
let alice = TestContext::new_alice().await;
let bob = TestContext::new_bob().await;
let raw = br###"Date: Thu, 28 Jan 2021 00:26:57 +0000
let raw = br"Date: Thu, 28 Jan 2021 00:26:57 +0000
Chat-Version: 1.0\n\
Message-ID: <foobarbaz@example.org>
To: Bob <bob@example.org>
@@ -3570,7 +3571,7 @@ Subject: subject
Chat-Disposition-Notification-To: alice@example.org
Message.
"###;
";
// Bob receives message.
receive_imf(&bob, raw, false).await?;