diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-01-06 11:33:56 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-01-06 11:33:56 +0100 |
commit | 53dbf82cbce3cb17cbcffd09558677faf8702f54 (patch) | |
tree | b78cca747e5c2bc004cb93b93536623f7abb6ef5 /src/mail/snapshot.rs | |
parent | 1ca6cd5de0656910213425e1d8f05256af820f21 (diff) | |
download | aerogramme-53dbf82cbce3cb17cbcffd09558677faf8702f54.tar.gz aerogramme-53dbf82cbce3cb17cbcffd09558677faf8702f54.zip |
Format code again
Diffstat (limited to 'src/mail/snapshot.rs')
-rw-r--r-- | src/mail/snapshot.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mail/snapshot.rs b/src/mail/snapshot.rs index c3145b4..0834f09 100644 --- a/src/mail/snapshot.rs +++ b/src/mail/snapshot.rs @@ -3,16 +3,16 @@ use std::sync::Arc; use anyhow::Result; use super::mailbox::Mailbox; +use super::query::{Query, QueryScope}; use super::uidindex::UidIndex; use super::unique_ident::UniqueIdent; -use super::query::{Query, QueryScope}; /// A Frozen Mailbox has a snapshot of the current mailbox /// state that is desynchronized with the real mailbox state. /// It's up to the user to choose when their snapshot must be updated /// to give useful information to their clients /// -/// +/// pub struct FrozenMailbox { pub mailbox: Arc<Mailbox>, pub snapshot: UidIndex, @@ -46,17 +46,17 @@ impl FrozenMailbox { /// Update the FrozenMailbox local snapshot. /// Returns the old snapshot, so you can build a diff pub async fn update(&mut self) -> UidIndex { - let old_snapshot = self.snapshot.clone(); - self.snapshot = self.mailbox.current_uid_index().await; + let old_snapshot = self.snapshot.clone(); + self.snapshot = self.mailbox.current_uid_index().await; - old_snapshot + old_snapshot } pub fn query<'a, 'b>(&'a self, uuids: &'b [UniqueIdent], scope: QueryScope) -> Query<'a, 'b> { Query { - frozen: self, - emails: uuids, - scope, + frozen: self, + emails: uuids, + scope, } } } |