diff options
Diffstat (limited to 'src/mail')
-rw-r--r-- | src/mail/incoming.rs | 6 | ||||
-rw-r--r-- | src/mail/mailbox.rs | 4 | ||||
-rw-r--r-- | src/mail/user.rs | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/mail/incoming.rs b/src/mail/incoming.rs index 2a6c947..3eafac7 100644 --- a/src/mail/incoming.rs +++ b/src/mail/incoming.rs @@ -51,8 +51,8 @@ async fn incoming_mail_watch_process_internal( creds: Credentials, mut rx_inbox_id: watch::Receiver<Option<(UniqueIdent, ImapUidvalidity)>>, ) -> Result<()> { - let mut lock_held = k2v_lock_loop(creds.storage.build()?, storage::RowRef::new(INCOMING_PK, INCOMING_LOCK_SK)); - let storage = creds.storage.build()?; + let mut lock_held = k2v_lock_loop(creds.storage.build().await?, storage::RowRef::new(INCOMING_PK, INCOMING_LOCK_SK)); + let storage = creds.storage.build().await?; let mut inbox: Option<Arc<Mailbox>> = None; let mut incoming_key = storage::RowRef::new(INCOMING_PK, INCOMING_WATCH_SK); @@ -411,7 +411,7 @@ impl EncryptedMessage { } pub async fn deliver_to(self: Arc<Self>, creds: PublicCredentials) -> Result<()> { - let storage = creds.storage.build()?; + let storage = creds.storage.build().await?; // Get causality token of previous watch key let query = storage::RowRef::new(INCOMING_PK, INCOMING_WATCH_SK); diff --git a/src/mail/mailbox.rs b/src/mail/mailbox.rs index 65f44b1..60a91dd 100644 --- a/src/mail/mailbox.rs +++ b/src/mail/mailbox.rs @@ -25,7 +25,7 @@ impl Mailbox { let index_path = format!("index/{}", id); let mail_path = format!("mail/{}", id); - let mut uid_index = Bayou::<UidIndex>::new(creds, index_path)?; + let mut uid_index = Bayou::<UidIndex>::new(creds, index_path).await?; uid_index.sync().await?; let uidvalidity = uid_index.state().uidvalidity; @@ -44,7 +44,7 @@ impl Mailbox { let mbox = RwLock::new(MailboxInternal { id, encryption_key: creds.keys.master.clone(), - storage: creds.storage.build()?, + storage: creds.storage.build().await?, uid_index, mail_path, }); diff --git a/src/mail/user.rs b/src/mail/user.rs index 8413cbf..8d12c58 100644 --- a/src/mail/user.rs +++ b/src/mail/user.rs @@ -174,7 +174,7 @@ impl User { // ---- Internal user & mailbox management ---- async fn open(username: String, creds: Credentials) -> Result<Arc<Self>> { - let storage = creds.storage.build()?; + let storage = creds.storage.build().await?; let (tx_inbox_id, rx_inbox_id) = watch::channel(None); |