aboutsummaryrefslogtreecommitdiff
path: root/src/imap
diff options
context:
space:
mode:
Diffstat (limited to 'src/imap')
-rw-r--r--src/imap/command/anonymous.rs4
-rw-r--r--src/imap/command/authenticated.rs14
-rw-r--r--src/imap/command/selected.rs14
-rw-r--r--src/imap/mod.rs4
-rw-r--r--src/imap/session.rs4
5 files changed, 20 insertions, 20 deletions
diff --git a/src/imap/command/anonymous.rs b/src/imap/command/anonymous.rs
index f5707ef..7e72458 100644
--- a/src/imap/command/anonymous.rs
+++ b/src/imap/command/anonymous.rs
@@ -1,8 +1,8 @@
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, Atom};
-use imap_codec::types::response::{Capability, Code, Data, Response as ImapRes, Status};
+use imap_codec::types::core::{AString};
+use imap_codec::types::response::{Capability, Data, Status};
use crate::imap::flow;
use crate::login::ArcLoginProvider;
diff --git a/src/imap/command/authenticated.rs b/src/imap/command/authenticated.rs
index c7e5642..392069f 100644
--- a/src/imap/command/authenticated.rs
+++ b/src/imap/command/authenticated.rs
@@ -1,14 +1,14 @@
-use anyhow::{anyhow, Error, Result};
+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::Atom;
use imap_codec::types::flag::Flag;
use imap_codec::types::mailbox::{ListMailbox, Mailbox as MailboxCodec};
-use imap_codec::types::response::{Code, Data, Response as ImapRes, Status};
+use imap_codec::types::response::{Code, Data, Status};
use crate::imap::command::anonymous;
use crate::imap::flow;
-use crate::imap::session::InnerContext;
+
use crate::mail::Mailbox;
const DEFAULT_FLAGS: [Flag; 5] = [
@@ -50,16 +50,16 @@ pub async fn dispatch<'a>(ctx: AuthenticatedContext<'a>) -> Result<(Response, fl
impl<'a> AuthenticatedContext<'a> {
async fn lsub(
self,
- reference: &MailboxCodec,
- mailbox_wildcard: &ListMailbox,
+ _reference: &MailboxCodec,
+ _mailbox_wildcard: &ListMailbox,
) -> Result<(Response, flow::Transition)> {
Ok((Response::bad("Not implemented")?, flow::Transition::None))
}
async fn list(
self,
- reference: &MailboxCodec,
- mailbox_wildcard: &ListMailbox,
+ _reference: &MailboxCodec,
+ _mailbox_wildcard: &ListMailbox,
) -> Result<(Response, flow::Transition)> {
Ok((Response::bad("Not implemented")?, flow::Transition::None))
}
diff --git a/src/imap/command/selected.rs b/src/imap/command/selected.rs
index 4e41561..d3dddd4 100644
--- a/src/imap/command/selected.rs
+++ b/src/imap/command/selected.rs
@@ -1,15 +1,15 @@
-use anyhow::{Error, Result};
+use anyhow::{Result};
use boitalettres::proto::Request;
use boitalettres::proto::Response;
use imap_codec::types::command::CommandBody;
-use imap_codec::types::core::Tag;
+
use imap_codec::types::fetch_attributes::MacroOrFetchAttributes;
-use imap_codec::types::response::{Response as ImapRes, Status};
+
use imap_codec::types::sequence::SequenceSet;
use crate::imap::command::authenticated;
use crate::imap::flow;
-use crate::imap::session::InnerContext;
+
use crate::mail::Mailbox;
pub struct SelectedContext<'a> {
@@ -40,9 +40,9 @@ pub async fn dispatch<'a>(ctx: SelectedContext<'a>) -> Result<(Response, flow::T
impl<'a> SelectedContext<'a> {
pub async fn fetch(
self,
- sequence_set: &SequenceSet,
- attributes: &MacroOrFetchAttributes,
- uid: &bool,
+ _sequence_set: &SequenceSet,
+ _attributes: &MacroOrFetchAttributes,
+ _uid: &bool,
) -> Result<(Response, flow::Transition)> {
Ok((Response::bad("Not implemented")?, flow::Transition::None))
}
diff --git a/src/imap/mod.rs b/src/imap/mod.rs
index b725859..0e9f49a 100644
--- a/src/imap/mod.rs
+++ b/src/imap/mod.rs
@@ -61,7 +61,7 @@ impl<'a> Service<&'a AddrStream> for Instance {
type Error = anyhow::Error;
type Future = BoxFuture<'static, Result<Self::Response>>;
- fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
+ fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
@@ -93,7 +93,7 @@ impl Service<Request> for Connection {
type Error = BalError;
type Future = BoxFuture<'static, Result<Self::Response, Self::Error>>;
- fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
+ fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
diff --git a/src/imap/session.rs b/src/imap/session.rs
index 72dd9d8..b7e2059 100644
--- a/src/imap/session.rs
+++ b/src/imap/session.rs
@@ -3,7 +3,7 @@ use boitalettres::errors::Error as BalError;
use boitalettres::proto::{Request, Response};
use futures::future::BoxFuture;
use futures::future::FutureExt;
-use imap_codec::types::response::{Response as ImapRes, Status};
+
use tokio::sync::mpsc::error::TrySendError;
use tokio::sync::{mpsc, oneshot};
@@ -32,7 +32,7 @@ impl Manager {
pub fn new(login_provider: ArcLoginProvider) -> Self {
let (tx, rx) = mpsc::channel(MAX_PIPELINED_COMMANDS);
tokio::spawn(async move {
- let mut instance = Instance::new(login_provider, rx);
+ let instance = Instance::new(login_provider, rx);
instance.start().await;
});
Self { tx }