aboutsummaryrefslogtreecommitdiff
path: root/src/mail/incoming.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2023-11-02 09:42:50 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2023-11-02 09:42:50 +0100
commit26f14df3f460320b2e2d31deb9d3cef90f43790c (patch)
tree377fa4a978ffe0e82b1ddba5c2009befb6f80fc7 /src/mail/incoming.rs
parentcf8b9ac28d6813bd589f363ad3659dd215bd7cea (diff)
downloadaerogramme-26f14df3f460320b2e2d31deb9d3cef90f43790c.tar.gz
aerogramme-26f14df3f460320b2e2d31deb9d3cef90f43790c.zip
we are doomed with static types
Diffstat (limited to 'src/mail/incoming.rs')
-rw-r--r--src/mail/incoming.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mail/incoming.rs b/src/mail/incoming.rs
index b7d2f48..7094b42 100644
--- a/src/mail/incoming.rs
+++ b/src/mail/incoming.rs
@@ -23,6 +23,7 @@ use crate::mail::unique_ident::*;
use crate::mail::user::User;
use crate::mail::IMF;
use crate::time::now_msec;
+use crate::storage::Sto;
const INCOMING_PK: &str = "incoming";
const INCOMING_LOCK_SK: &str = "lock";
@@ -139,14 +140,14 @@ async fn incoming_mail_watch_process_internal(
Ok(())
}
-async fn handle_incoming_mail(
+async fn handle_incoming_mail<X: Sto>(
user: &Arc<User>,
s3: &S3Client,
inbox: &Arc<Mailbox>,
lock_held: &watch::Receiver<bool>,
) -> Result<()> {
let lor = ListObjectsV2Request {
- bucket: user.creds.storage.bucket.clone(),
+ bucket: user.creds.storage.engine::<X>().bucket.clone(),
max_keys: Some(1000),
prefix: Some("incoming/".into()),
..Default::default()