diff options
Diffstat (limited to 'src/mail')
-rw-r--r-- | src/mail/incoming.rs | 8 | ||||
-rw-r--r-- | src/mail/mailbox.rs | 6 | ||||
-rw-r--r-- | src/mail/user.rs | 21 |
3 files changed, 20 insertions, 15 deletions
diff --git a/src/mail/incoming.rs b/src/mail/incoming.rs index 290f1b3..b7d2f48 100644 --- a/src/mail/incoming.rs +++ b/src/mail/incoming.rs @@ -450,10 +450,10 @@ impl EncryptedMessage { let por = PutObjectRequest { bucket: creds.storage.bucket.clone(), key: format!("incoming/{}", gen_ident()), - metadata: Some( - [(MESSAGE_KEY.to_string(), key_header)] - .into_iter() - .collect::<HashMap<_, _>>(), + metadata: Some( + [(MESSAGE_KEY.to_string(), key_header)] + .into_iter() + .collect::<HashMap<_, _>>(), ), body: Some(self.encrypted_body.clone().into()), ..Default::default() diff --git a/src/mail/mailbox.rs b/src/mail/mailbox.rs index fe36a14..d92140d 100644 --- a/src/mail/mailbox.rs +++ b/src/mail/mailbox.rs @@ -369,7 +369,7 @@ impl MailboxInternal { // Save mail meta let meta = MailMeta { internaldate: now_msec(), - headers: mail.parsed.raw_headers.to_vec(), + headers: mail.parsed.raw_headers.to_vec(), message_key: message_key.clone(), rfc822_size: mail.raw.len(), }; @@ -400,7 +400,7 @@ impl MailboxInternal { futures::try_join!( async { // Delete mail body from S3 - let dor = DeleteObjectRequest{ + let dor = DeleteObjectRequest { bucket: self.bucket.clone(), key: format!("{}/{}", self.mail_path, ident), ..Default::default() @@ -461,7 +461,7 @@ impl MailboxInternal { futures::try_join!( async { // Copy mail body from S3 - let cor = CopyObjectRequest{ + let cor = CopyObjectRequest { bucket: self.bucket.clone(), key: format!("{}/{}", self.mail_path, new_id), copy_source: format!("{}/{}/{}", from.bucket, from.mail_path, source_id), diff --git a/src/mail/user.rs b/src/mail/user.rs index 44e0081..5523c2a 100644 --- a/src/mail/user.rs +++ b/src/mail/user.rs @@ -334,17 +334,22 @@ impl MailboxList { } fn has_mailbox(&self, name: &str) -> bool { - matches!(self.0.get(name), Some(MailboxListEntry { - id_lww: (_, Some(_)), - .. - })) + matches!( + self.0.get(name), + Some(MailboxListEntry { + id_lww: (_, Some(_)), + .. + }) + ) } fn get_mailbox(&self, name: &str) -> Option<(ImapUidvalidity, Option<UniqueIdent>)> { - self.0.get(name).map(|MailboxListEntry { - id_lww: (_, mailbox_id), - uidvalidity, - }| (*uidvalidity, *mailbox_id)) + self.0.get(name).map( + |MailboxListEntry { + id_lww: (_, mailbox_id), + uidvalidity, + }| (*uidvalidity, *mailbox_id), + ) } /// Ensures mailbox `name` maps to id `id`. |