This commit is contained in:
mdecimus
2025-01-28 18:26:37 +01:00
parent 3e300dd2c2
commit 0bcf5f513c
4 changed files with 30 additions and 8 deletions
+4
View File
@@ -1,3 +1,7 @@
mail-parser 0.10.2
================================
- Fixed `HeaderName` enum order to avoid breaking bincode serialization.
mail-parser 0.10.1
================================
- Fixed `HeaderName::parse` function.
+2 -2
View File
@@ -1,7 +1,7 @@
[package]
name = "mail-parser"
description = "Fast and robust e-mail parsing library for Rust"
version = "0.10.1"
version = "0.10.2"
edition = "2021"
authors = [ "Stalwart Labs <hello@stalw.art>"]
license = "Apache-2.0 OR MIT"
@@ -13,7 +13,7 @@ readme = "README.md"
resolver = "2"
[dependencies]
hashify = { version = "0.2.1" }
hashify = { version = "0.2" }
encoding_rs = { version = "0.8", optional = true }
serde = { version = "1.0", features = ["derive"], optional = true }
+4 -4
View File
@@ -162,9 +162,6 @@ pub struct Header<'x> {
#[cfg_attr(feature = "serde_support", serde(rename_all = "snake_case"))]
#[non_exhaustive]
pub enum HeaderName<'x> {
ArcAuthenticationResults,
ArcMessageSignature,
ArcSeal,
Subject,
From,
To,
@@ -188,7 +185,6 @@ pub enum HeaderName<'x> {
ContentTransferEncoding,
ContentType,
ContentDisposition,
DkimSignature,
ResentTo,
ResentFrom,
ResentBcc,
@@ -204,6 +200,10 @@ pub enum HeaderName<'x> {
ListSubscribe,
ListUnsubscribe,
Other(Cow<'x, str>),
DkimSignature,
ArcAuthenticationResults,
ArcMessageSignature,
ArcSeal,
}
/// Parsed header value.
+20 -2
View File
@@ -5,8 +5,26 @@
*/
fn is_re_prefix(prefix: &str) -> bool {
hashify::tiny_set! {prefix.as_bytes(), "re", "res", "sv", "antw", "ref", "aw", "απ", "השב", "vá", "r", "rif", "bls", "odp", "ynt",
"atb", "رد", "回复", "转发",}
hashify::tiny_set! {prefix.as_bytes(),
"re",
"res",
"sv",
"antw",
"ref",
"aw",
"απ",
"השב",
"vá",
"r",
"rif",
"bls",
"odp",
"ynt",
"atb",
"رد",
"回复",
"转发",
}
}
fn is_fwd_prefix(prefix: &str) -> bool {