aboutsummaryrefslogtreecommitdiff
path: root/src/mailbox.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2022-06-14 10:19:24 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2022-06-14 10:19:24 +0200
commit9c95b261e00299933368a18ce56e238f50874cc4 (patch)
tree0db3baa88c7a22e61afe393a370130e7bdac11b6 /src/mailbox.rs
parent12b379e7c3f832be5fd650ce3abc33b7d0b9fed8 (diff)
downloadaerogramme-9c95b261e00299933368a18ce56e238f50874cc4.tar.gz
aerogramme-9c95b261e00299933368a18ce56e238f50874cc4.zip
cargo fmt + WIP uid index improvement
Diffstat (limited to 'src/mailbox.rs')
-rw-r--r--src/mailbox.rs20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/mailbox.rs b/src/mailbox.rs
index 3b1ac99..9d6c1fc 100644
--- a/src/mailbox.rs
+++ b/src/mailbox.rs
@@ -9,13 +9,17 @@ use crate::login::Credentials;
use crate::uidindex::*;
pub struct Summary {
- pub validity: ImapUidvalidity,
- pub next: ImapUid,
- pub exists: usize,
+ pub validity: ImapUidvalidity,
+ pub next: ImapUid,
+ pub exists: usize,
}
impl std::fmt::Display for Summary {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
- write!(f, "uidvalidity: {}, uidnext: {}, exists: {}", self.validity, self.next, self.exists)
+ write!(
+ f,
+ "uidvalidity: {}, uidnext: {}, exists: {}",
+ self.validity, self.next, self.exists
+ )
}
}
@@ -49,10 +53,10 @@ impl Mailbox {
let state = self.uid_index.state();
return Ok(Summary {
- validity: state.uidvalidity,
- next: state.uidnext,
- exists: state.mail_uid.len(),
- })
+ validity: state.uidvalidity,
+ next: state.uidnext,
+ exists: state.mail_uid.len(),
+ });
}
pub async fn test(&mut self) -> Result<()> {