mirror of
https://github.com/stalwartlabs/mail-parser.git
synced 2026-12-04 08:01:42 +00:00
clippy fixes
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
mail-parser 0.11.8
|
||||
================================
|
||||
|
||||
mail-parser 0.11.7
|
||||
================================
|
||||
- Added more IANA headers.
|
||||
|
||||
+1
-1
@@ -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"
|
||||
|
||||
@@ -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
@@ -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<'_> {
|
||||
|
||||
Reference in New Issue
Block a user