Rename get_headerdef into get_header_value

This commit is contained in:
Alexander Krotov
2020-02-11 01:23:31 +03:00
parent c801775a39
commit 66fdb447f7
5 changed files with 24 additions and 19 deletions

View File

@@ -125,7 +125,7 @@ pub fn try_decrypt(
) -> Result<(Option<Vec<u8>>, HashSet<String>)> {
let from = mail
.headers
.get_headerdef(HeaderDef::From_)?
.get_header_value(HeaderDef::From_)?
.and_then(|from_addr| mailparse::addrparse(&from_addr).ok())
.and_then(|from| from.extract_single_info())
.map(|from| from.addr)