diff options
author | Alex Auvolat <alex@adnab.me> | 2022-05-31 15:49:10 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-05-31 15:49:10 +0200 |
commit | 01d82c14ca61e7c4de1e72c5f94456610464c064 (patch) | |
tree | 20ada5789d449182e18c3a18751ffd0473486614 /src/mailbox.rs | |
parent | d53cf1d220ef08c0b9368cfe91bee7660b7f5a3b (diff) | |
download | aerogramme-01d82c14ca61e7c4de1e72c5f94456610464c064.tar.gz aerogramme-01d82c14ca61e7c4de1e72c5f94456610464c064.zip |
UUID generator; import kannader smtp server
Diffstat (limited to 'src/mailbox.rs')
-rw-r--r-- | src/mailbox.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mailbox.rs b/src/mailbox.rs index a20ca15..49d8e56 100644 --- a/src/mailbox.rs +++ b/src/mailbox.rs @@ -1,11 +1,11 @@ use anyhow::Result; use k2v_client::K2vClient; -use rand::prelude::*; use rusoto_s3::S3Client; use crate::bayou::Bayou; use crate::cryptoblob::Key; use crate::login::Credentials; +use crate::mail_uuid::*; use crate::uidindex::*; pub struct Mailbox { @@ -38,12 +38,10 @@ impl Mailbox { dump(&self.uid_index); - let mut rand_id = [0u8; 24]; - rand_id[..16].copy_from_slice(&u128::to_be_bytes(thread_rng().gen())); let add_mail_op = self .uid_index .state() - .op_mail_add(MailUuid(rand_id), vec!["\\Unseen".into()]); + .op_mail_add(gen_uuid(), vec!["\\Unseen".into()]); self.uid_index.push(add_mail_op).await?; dump(&self.uid_index); |