mirror of
https://github.com/stalwartlabs/mail-parser.git
synced 2026-11-28 08:01:24 +00:00
Moved HTML entity mappings to hashify large map
This commit is contained in:
+1
-1
@@ -13,7 +13,7 @@ readme = "README.md"
|
||||
resolver = "2"
|
||||
|
||||
[dependencies]
|
||||
hashify = { path = "../hashify" }
|
||||
hashify = { version = "0.2" }
|
||||
encoding_rs = { version = "0.8", optional = true }
|
||||
serde = { version = "1.0", features = ["derive"], optional = true }
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ pub fn charset_decoder(charset: &[u8]) -> Option<DecoderFnc> {
|
||||
};
|
||||
}
|
||||
|
||||
hashify::map!(&l_charset[..charset.len().clamp(1, 45)],
|
||||
hashify::tiny_map!(&l_charset[..charset.len().clamp(1, 45)],
|
||||
"850" => decoder_ibm_850,
|
||||
"866" => decoder_ibm866,
|
||||
"arabic" => decoder_iso_8859_6,
|
||||
|
||||
+2139
-756
File diff suppressed because it is too large
Load Diff
@@ -449,7 +449,7 @@ impl<'x> MessageStream<'x> {
|
||||
}
|
||||
}
|
||||
|
||||
hashify::map! { buf.as_ref(),
|
||||
hashify::tiny_map! { buf.as_ref(),
|
||||
"EDT" => -4,
|
||||
"EST" => -5,
|
||||
"CDT" => -5,
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
*/
|
||||
|
||||
fn is_re_prefix(prefix: &str) -> bool {
|
||||
hashify::set! {prefix.as_bytes(), "re", "res", "sv", "antw", "ref", "aw", "απ", "השב", "vá", "r", "rif", "bls", "odp", "ynt",
|
||||
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 {
|
||||
hashify::set! {prefix.as_bytes(),
|
||||
hashify::tiny_set! {prefix.as_bytes(),
|
||||
"fwd",
|
||||
"fw",
|
||||
"rv",
|
||||
|
||||
@@ -161,7 +161,7 @@ impl<'x> HeaderName<'x> {
|
||||
}
|
||||
|
||||
fn header_map(name: &[u8]) -> Option<HeaderName<'static>> {
|
||||
hashify::map! {name,
|
||||
hashify::tiny_map! {name,
|
||||
"arc-authentication-results" => HeaderName::ArcAuthenticationResults,
|
||||
"arc-seal" => HeaderName::ArcSeal,
|
||||
"arc-message-signature" => HeaderName::ArcMessageSignature,
|
||||
|
||||
Reference in New Issue
Block a user