aboutsummaryrefslogtreecommitdiff
path: root/src/mail/mailbox.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-06-30 14:17:54 +0200
committerAlex Auvolat <alex@adnab.me>2022-06-30 16:04:51 +0200
commit90c20a840dfdbb47ddc63725baa04feafec0ee1b (patch)
tree7909254b5a6a6be1ad3d48835a9e5873cbd885f1 /src/mail/mailbox.rs
parent7efe08a9b8ef0af63cc80ab8fc67c5dabb726d26 (diff)
downloadaerogramme-90c20a840dfdbb47ddc63725baa04feafec0ee1b.tar.gz
aerogramme-90c20a840dfdbb47ddc63725baa04feafec0ee1b.zip
Implement create_mailbox
Diffstat (limited to 'src/mail/mailbox.rs')
-rw-r--r--src/mail/mailbox.rs14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/mail/mailbox.rs b/src/mail/mailbox.rs
index 643a869..c4fa435 100644
--- a/src/mail/mailbox.rs
+++ b/src/mail/mailbox.rs
@@ -22,7 +22,11 @@ pub struct Mailbox {
}
impl Mailbox {
- pub(super) async fn open(creds: &Credentials, id: UniqueIdent, min_uidvalidity: ImapUidvalidity) -> Result<Self> {
+ pub(super) async fn open(
+ creds: &Credentials,
+ id: UniqueIdent,
+ min_uidvalidity: ImapUidvalidity,
+ ) -> Result<Self> {
let index_path = format!("index/{}", id);
let mail_path = format!("mail/{}", id);
@@ -31,7 +35,13 @@ impl Mailbox {
let uidvalidity = uid_index.state().uidvalidity;
if uidvalidity < min_uidvalidity {
- uid_index.push(uid_index.state().op_bump_uidvalidity(min_uidvalidity.get() - uidvalidity.get())).await?;
+ uid_index
+ .push(
+ uid_index
+ .state()
+ .op_bump_uidvalidity(min_uidvalidity.get() - uidvalidity.get()),
+ )
+ .await?;
}
let mbox = RwLock::new(MailboxInternal {