From 8b7eb1ca918d26901b0739526341128067ca1cbc Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Wed, 29 Jun 2022 13:41:05 +0200 Subject: work on prototypes --- src/imap/command/anonymous.rs | 4 ++-- src/imap/command/authenticated.rs | 2 +- src/imap/command/selected.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/imap/command') diff --git a/src/imap/command/anonymous.rs b/src/imap/command/anonymous.rs index 5f982ba..8cd986c 100644 --- a/src/imap/command/anonymous.rs +++ b/src/imap/command/anonymous.rs @@ -1,12 +1,12 @@ use anyhow::{Error, Result}; use boitalettres::proto::{res::body::Data as Body, Request, Response}; use imap_codec::types::command::CommandBody; -use imap_codec::types::core::{AString}; +use imap_codec::types::core::AString; use imap_codec::types::response::{Capability, Data, Status}; use crate::imap::flow; -use crate::mail::user::User; use crate::login::ArcLoginProvider; +use crate::mail::user::User; //--- dispatching diff --git a/src/imap/command/authenticated.rs b/src/imap/command/authenticated.rs index b79865f..47df5be 100644 --- a/src/imap/command/authenticated.rs +++ b/src/imap/command/authenticated.rs @@ -96,7 +96,7 @@ impl<'a> AuthenticatedContext<'a> { async fn select(self, mailbox: &MailboxCodec) -> Result<(Response, flow::Transition)> { let name = String::try_from(mailbox.clone())?; - let mut mb = self.user.open_mailbox(name.clone())?; + let mut mb = self.user.open_mailbox(name)?; tracing::info!(username=%self.user.username, mailbox=%name, "mailbox.selected"); let sum = mb.summary().await?; diff --git a/src/imap/command/selected.rs b/src/imap/command/selected.rs index bd46bd5..b1bba23 100644 --- a/src/imap/command/selected.rs +++ b/src/imap/command/selected.rs @@ -1,4 +1,4 @@ -use anyhow::{Result}; +use anyhow::Result; use boitalettres::proto::Request; use boitalettres::proto::Response; use imap_codec::types::command::CommandBody; -- cgit v1.2.3