diff --git a/melib/src/backends/imap/untagged.rs b/melib/src/backends/imap/untagged.rs index 536b18b37..27fcf570b 100644 --- a/melib/src/backends/imap/untagged.rs +++ b/melib/src/backends/imap/untagged.rs @@ -95,7 +95,7 @@ impl ImapConnection { .unwrap() .entry(mailbox_hash) .or_default() - .remove(n.try_into().unwrap()); + .remove(TryInto::::try_into(n).unwrap().saturating_sub(1)); debug!("expunge {}, UID = {}", n, deleted_uid); let deleted_hash: crate::email::EnvelopeHash = match self .uid_store