Clippy fixes

This commit is contained in:
Maurus Decimus
2026-07-09 15:26:03 +02:00
parent e2d0505013
commit e21fc8bc9d
9 changed files with 15 additions and 19 deletions

View File

@@ -81,7 +81,7 @@ pub fn check_contains(haystack: &str, needle: &str, msg: impl std::fmt::Display)
} else {
Err(Fail::Assert(format!(
"{msg}: expected to contain {needle:?}, got {:?}",
&haystack.chars().take(200).collect::<String>()
haystack.chars().take(200).collect::<String>()
)))
}
}

View File

@@ -726,7 +726,7 @@ async fn accept_milter(
"shutdown" => Action::Shutdown,
"conn_fail" => Action::ConnectionFailure,
"reply_code" => Action::ReplyCode {
code: [b'3', b'2', b'1'],
code: *b"321",
text: "test".into(),
},
test_num => {

View File

@@ -142,12 +142,12 @@ pub fn test() {
last_itip = Some(itip_update(
&mut ical,
entry.get_mut(),
&[account.to_string()],
std::slice::from_ref(account),
));
entry.insert(ical);
}
Entry::Vacant(entry) => {
last_itip = Some(itip_create(&mut ical, &[account.to_string()]));
last_itip = Some(itip_create(&mut ical, std::slice::from_ref(account)));
entry.insert(ical);
}
}
@@ -247,7 +247,7 @@ pub fn test() {
for rcpt in &message.to {
let result = match itip_snapshot(
&message.message,
&[rcpt.to_string()],
std::slice::from_ref(rcpt),
false,
) {
Ok(itip_snapshots) => {
@@ -260,7 +260,7 @@ pub fn test() {
let ical = entry.get_mut();
let snapshots = itip_snapshot(
ical,
&[rcpt.to_string()],
std::slice::from_ref(rcpt),
false,
)
.expect("Failed to create iTIP snapshot");