diff options
author | Alex Auvolat <alex@adnab.me> | 2022-07-12 15:35:25 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-07-12 15:35:25 +0200 |
commit | fc2e25ce76c20a4d2e8316317c7303ae8d78b031 (patch) | |
tree | 55b0f4556df0de781fee63ef080945e6fa9d0c77 /src/mail/mailbox.rs | |
parent | 5d6e4f73322b26038e76e6f915c6c79c5f03566e (diff) | |
download | aerogramme-fc2e25ce76c20a4d2e8316317c7303ae8d78b031.tar.gz aerogramme-fc2e25ce76c20a4d2e8316317c7303ae8d78b031.zip |
Clean up
Diffstat (limited to 'src/mail/mailbox.rs')
-rw-r--r-- | src/mail/mailbox.rs | 50 |
1 files changed, 2 insertions, 48 deletions
diff --git a/src/mail/mailbox.rs b/src/mail/mailbox.rs index efe98fd..e80fa34 100644 --- a/src/mail/mailbox.rs +++ b/src/mail/mailbox.rs @@ -44,6 +44,8 @@ impl Mailbox { .await?; } + dump(&uid_index); + let mbox = RwLock::new(MailboxInternal { id, bucket: creds.bucket().to_string(), @@ -153,13 +155,6 @@ impl Mailbox { }; selflock.move_from(&mut fromlock, uuid).await } - - // ---- - - /// Test procedure TODO WILL REMOVE THIS - pub async fn test(&self) -> Result<()> { - self.mbox.write().await.test().await - } } // ---- @@ -437,47 +432,6 @@ impl MailboxInternal { Ok(()) } - - // ---- - - async fn test(&mut self) -> Result<()> { - Ok(()) - - /* - self.uid_index.sync().await?; - - dump(&self.uid_index); - - let mail = br#"From: Garage team <garagehq@deuxfleurs.fr> - Subject: Welcome to Aerogramme!! - - This is just a test email, feel free to ignore. - "#; - let mail = IMF::try_from(&mail[..]).unwrap(); - self.append(mail, None).await?; - - dump(&self.uid_index); - - if self.uid_index.state().idx_by_uid.len() > 6 { - for i in 0..2 { - let (_, ident) = self - .uid_index - .state() - .idx_by_uid - .iter() - .skip(3 + i) - .next() - .unwrap(); - - self.delete(*ident).await?; - - dump(&self.uid_index); - } - } - - Ok(()) - */ - } } fn dump(uid_index: &Bayou<UidIndex>) { |