aboutsummaryrefslogtreecommitdiff
path: root/src/imap/mail_view.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2024-01-05 10:05:30 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2024-01-05 10:05:30 +0100
commitac8fb89d56351fbc0017b8a7a8a4ddf53217ab60 (patch)
treea404d0ff5fd1ccd07a23b7111ca3b5ba3a92ffb6 /src/imap/mail_view.rs
parentcd74ae5e638a03e2656fb54aa09a976e6939e1e3 (diff)
downloadaerogramme-ac8fb89d56351fbc0017b8a7a8a4ddf53217ab60.tar.gz
aerogramme-ac8fb89d56351fbc0017b8a7a8a4ddf53217ab60.zip
reformat cargo
Diffstat (limited to 'src/imap/mail_view.rs')
-rw-r--r--src/imap/mail_view.rs25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/imap/mail_view.rs b/src/imap/mail_view.rs
index d1f8a58..c95c733 100644
--- a/src/imap/mail_view.rs
+++ b/src/imap/mail_view.rs
@@ -3,7 +3,6 @@ use std::num::NonZeroU32;
use anyhow::{anyhow, bail, Result};
use chrono::{Offset, TimeZone, Utc};
-
use imap_codec::imap_types::core::{IString, NString};
use imap_codec::imap_types::datetime::DateTime;
use imap_codec::imap_types::fetch::{
@@ -17,13 +16,13 @@ use eml_codec::{
part::{composite::Message, AnyPart},
};
-use crate::imap::response::Body;
-use crate::imap::mime_view;
-use crate::imap::flags;
use crate::imap::attributes::AttributesProxy;
-use crate::mail::mailbox::MailMeta;
-use crate::imap::mailbox_view::MailIdentifiers;
+use crate::imap::flags;
use crate::imap::imf_view::message_envelope;
+use crate::imap::mailbox_view::MailIdentifiers;
+use crate::imap::mime_view;
+use crate::imap::response::Body;
+use crate::mail::mailbox::MailMeta;
pub struct MailView<'a> {
pub ids: &'a MailIdentifiers,
@@ -121,10 +120,11 @@ impl<'a> MailView<'a> {
}
// Process message
- let (text, origin) = match mime_view::body_ext(self.content.as_anypart()?, section, partial)? {
- mime_view::BodySection::Full(body) => (body, None),
- mime_view::BodySection::Slice { body, origin_octet } => (body, Some(origin_octet)),
- };
+ let (text, origin) =
+ match mime_view::body_ext(self.content.as_anypart()?, section, partial)? {
+ mime_view::BodySection::Full(body) => (body, None),
+ mime_view::BodySection::Slice { body, origin_octet } => (body, Some(origin_octet)),
+ };
let data = NString(text.to_vec().try_into().ok().map(IString::Literal));
@@ -185,14 +185,12 @@ impl<'a> MailView<'a> {
}
}
-
pub enum SeenFlag {
DoNothing,
MustAdd,
}
-
-// -------------------
+// -------------------
pub enum FetchedMail<'a> {
Partial(imf::Imf<'a>),
@@ -229,4 +227,3 @@ impl<'a> FetchedMail<'a> {
}
}
}
-