Reduce unwrap and expect usage

This commit is contained in:
link2xt
2022-05-21 14:12:23 +00:00
parent 9549aca48b
commit 73341394ee
16 changed files with 134 additions and 130 deletions

View File

@@ -1441,7 +1441,9 @@ async fn create_or_lookup_group(
return Ok(None);
}
let grpname = mime_parser.get_header(HeaderDef::ChatGroupName).unwrap();
let grpname = mime_parser
.get_header(HeaderDef::ChatGroupName)
.context("Chat-Group-Name vanished")?;
let new_chat_id = ChatId::create_multiuser_record(
context,
Chattype::Group,