mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 04:46:29 +03:00
imap: remove unwrap()
This commit is contained in:
@@ -1315,7 +1315,8 @@ impl Imap {
|
|||||||
let folder = folder.clone();
|
let folder = folder.clone();
|
||||||
|
|
||||||
// safe, as we checked above that there is a body.
|
// safe, as we checked above that there is a body.
|
||||||
let body = body.unwrap();
|
let body = body
|
||||||
|
.context("we checked that message has body right above, but it has vanished")?;
|
||||||
let is_seen = msg.flags().any(|flag| flag == Flag::Seen);
|
let is_seen = msg.flags().any(|flag| flag == Flag::Seen);
|
||||||
|
|
||||||
match dc_receive_imf_inner(
|
match dc_receive_imf_inner(
|
||||||
@@ -1370,7 +1371,7 @@ impl Imap {
|
|||||||
bail!("Can't set flag, should reconnect");
|
bail!("Can't set flag, should reconnect");
|
||||||
}
|
}
|
||||||
|
|
||||||
let session = self.session.as_mut().context("No session").unwrap();
|
let session = self.session.as_mut().context("No session")?;
|
||||||
let query = format!("+FLAGS ({})", flag);
|
let query = format!("+FLAGS ({})", flag);
|
||||||
let mut responses = session
|
let mut responses = session
|
||||||
.uid_store(uid_set, &query)
|
.uid_store(uid_set, &query)
|
||||||
|
|||||||
Reference in New Issue
Block a user