clippy fixes

This commit is contained in:
Maurus Decimus
2026-08-21 17:24:58 +02:00
parent 1883c39102
commit 350034b33c
4 changed files with 6 additions and 3 deletions
+3
View File
@@ -1,3 +1,6 @@
mail-parser 0.11.8
================================
mail-parser 0.11.7
================================
- Added more IANA headers.
+1 -1
View File
@@ -1,7 +1,7 @@
[package]
name = "mail-parser"
description = "Fast and robust e-mail parsing library for Rust"
version = "0.11.7"
version = "0.11.8"
edition = "2024"
authors = [ "Stalwart Labs <hello@stalw.art>"]
license = "Apache-2.0 OR MIT"
+1 -1
View File
@@ -98,7 +98,7 @@ pub(crate) fn decoder_utf7(bytes: &[u8]) -> String {
fn decoder_utf16_(bytes: &[u8], fnc: fn([u8; 2]) -> u16) -> String {
if bytes.len() >= 2 {
decode_utf16(bytes.chunks_exact(2).map(|c| fnc([c[0], c[1]])))
decode_utf16(bytes.as_chunks::<2>().0.iter().map(|c| fnc(*c)))
.map(|r| r.unwrap_or(REPLACEMENT_CHARACTER))
.collect::<String>()
} else {
+1 -1
View File
@@ -220,8 +220,8 @@ macro_rules! header_names {
#[cfg_attr(feature = "rkyv", rkyv(compare(PartialEq)))]
#[non_exhaustive]
pub enum HeaderName<'x> {
$($variant,)+
Other(#[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::AsOwned))] Cow<'x, str>),
$($variant,)+
}
impl HeaderName<'_> {