MCPcopy Create free account
hub / github.com/chatmail/core / remove_header

Function remove_header

src/mimeparser.rs:2073–2084  ·  view source on GitHub ↗
(
    headers: &mut HashMap<String, String>,
    key: &str,
    removed: &mut HashSet<String>,
)

Source from the content-addressed store, hash-verified

2071}
2072
2073fn remove_header(
2074 headers: &mut HashMap<String, String>,
2075 key: &str,
2076 removed: &mut HashSet<String>,
2077) -> Option<String> {
2078 if let Some((k, v)) = headers.remove_entry(key) {
2079 removed.insert(k);
2080 Some(v)
2081 } else {
2082 None
2083 }
2084}
2085
2086/// Parses `Autocrypt-Gossip` headers from the email,
2087/// saves the keys into the `public_keys` table,

Callers 2

from_bytesMethod · 0.85

Calls 1

insertMethod · 0.80

Tested by

no test coverage detected