Make Aheader::from_imffields accept &str, not const char *

This commit is contained in:
Dmitry Bogatov
2019-09-12 06:32:13 +00:00
parent cdfc7281d0
commit 7c4d7fb3dd
2 changed files with 5 additions and 8 deletions

View File

@@ -408,7 +408,8 @@ impl E2eeHelper {
}
}
let mut peerstate = None;
let autocryptheader = Aheader::from_imffields(from, imffields);
let autocryptheader =
as_opt_str(from).and_then(|from| Aheader::from_imffields(from, imffields));
if message_time > 0 && !from.is_null() {
peerstate = Peerstate::from_addr(context, &context.sql, as_str(from));