diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-02-22 17:31:03 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-02-22 17:31:03 +0100 |
commit | 9b26e251e3d6d7b850064a2c1ed5bb5870918f1e (patch) | |
tree | a90c8adb0a97e7e58c90727d7ad7419a5fa0ccd6 /src/imap/mailbox_view.rs | |
parent | 2adf73dd8e6e76997d4fb67f9f7b3fe065530722 (diff) | |
download | aerogramme-9b26e251e3d6d7b850064a2c1ed5bb5870918f1e.tar.gz aerogramme-9b26e251e3d6d7b850064a2c1ed5bb5870918f1e.zip |
formatting
Diffstat (limited to 'src/imap/mailbox_view.rs')
-rw-r--r-- | src/imap/mailbox_view.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/imap/mailbox_view.rs b/src/imap/mailbox_view.rs index f6395b4..1c53b93 100644 --- a/src/imap/mailbox_view.rs +++ b/src/imap/mailbox_view.rs @@ -370,7 +370,7 @@ impl MailboxView { .fetch() .zip(futures::stream::iter(mail_idx_list)) // [3/6] Derive an IMAP-specific view from the results, apply the filters - .map(|(maybe_qr, midx)| match maybe_qr { + .map(|(maybe_qr, midx)| match maybe_qr { Ok(qr) => Ok((MailView::new(&qr, midx)?.filter(&ap)?, midx)), Err(e) => Err(e), }) @@ -381,7 +381,10 @@ impl MailboxView { // [5/6] Register the \Seen flags if matches!(seen, SeenFlag::MustAdd) { let seen_flag = Flag::Seen.to_string(); - self.internal.mailbox.add_flags(midx.uuid, &[seen_flag]).await?; + self.internal + .mailbox + .add_flags(midx.uuid, &[seen_flag]) + .await?; } Ok::<_, anyhow::Error>(body) @@ -429,13 +432,12 @@ impl MailboxView { Ok(true) => Some(Ok(*midx)), Ok(_) => None, Err(e) => Some(Err(e)), - } + }, Err(e) => Some(Err(e)), }; futures::future::ready(r) }); - // 7. Chain both streams (part resolved from index, part resolved from metadata+body) let main_stream = futures::stream::iter(kept_idx) .map(Ok) |