aboutsummaryrefslogtreecommitdiff
path: root/src/imap/mailbox_view.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2024-01-10 12:55:38 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2024-01-10 12:55:38 +0100
commit51510c97f7b76a73a2032eb089552cf9a13e9274 (patch)
tree76f45feb92e6e86de09f117d4a41710d35091c4b /src/imap/mailbox_view.rs
parenta2d6efc962dbf5de64a70cf7d9f293534bd5369a (diff)
downloadaerogramme-51510c97f7b76a73a2032eb089552cf9a13e9274.tar.gz
aerogramme-51510c97f7b76a73a2032eb089552cf9a13e9274.zip
fix some logic error in the internals
Diffstat (limited to 'src/imap/mailbox_view.rs')
-rw-r--r--src/imap/mailbox_view.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/imap/mailbox_view.rs b/src/imap/mailbox_view.rs
index 046acfa..90cfc70 100644
--- a/src/imap/mailbox_view.rs
+++ b/src/imap/mailbox_view.rs
@@ -108,7 +108,7 @@ impl MailboxView {
let old_mail = old_snapshot.table.get(uuid);
let new_mail = new_snapshot.table.get(uuid);
if old_mail.is_some() && old_mail != new_mail {
- if let Some((uid, flags)) = new_mail {
+ if let Some((uid, _modseq, flags)) = new_mail {
data.push(Body::Data(Data::Fetch {
seq: NonZeroU32::try_from((i + 1) as u32).unwrap(),
items: vec![
@@ -185,7 +185,7 @@ impl MailboxView {
let msgs = state
.table
.iter()
- .filter(|(_uuid, (_uid, flags))| flags.iter().any(|x| *x == deleted_flag))
+ .filter(|(_uuid, (_uid, _modseq, flags))| flags.iter().any(|x| *x == deleted_flag))
.map(|(uuid, _)| *uuid);
for msg in msgs {
@@ -438,7 +438,7 @@ impl MailboxView {
.table
.values()
.enumerate()
- .find(|(_i, (_imap_uid, flags))| !flags.contains(&"\\Seen".to_string()))
+ .find(|(_i, (_imap_uid, _modseq, flags))| !flags.contains(&"\\Seen".to_string()))
.map(|(i, _)| NonZeroU32::try_from(i as u32 + 1))
.transpose()?)
}