aboutsummaryrefslogtreecommitdiff
path: root/src/imap/command/anonymous.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2022-06-28 10:49:28 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2022-06-28 10:49:28 +0200
commit36bbc2138bceb0c80a306f8c225e340d6fbd5470 (patch)
tree9592daf96a58a61b16337968b662e85199e0e158 /src/imap/command/anonymous.rs
parent927b461f25e8202a33fadc1f823d4feed6282f60 (diff)
downloadaerogramme-36bbc2138bceb0c80a306f8c225e340d6fbd5470.tar.gz
aerogramme-36bbc2138bceb0c80a306f8c225e340d6fbd5470.zip
cargo fmt + implement noop
Diffstat (limited to 'src/imap/command/anonymous.rs')
-rw-r--r--src/imap/command/anonymous.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/imap/command/anonymous.rs b/src/imap/command/anonymous.rs
index a2f2260..8de27cb 100644
--- a/src/imap/command/anonymous.rs
+++ b/src/imap/command/anonymous.rs
@@ -11,11 +11,12 @@ use crate::imap::session::InnerContext;
pub async fn dispatch<'a>(ctx: InnerContext<'a>) -> Result<(Response, flow::Transition)> {
match &ctx.req.command.body {
+ CommandBody::Noop => Ok((Response::ok("Noop completed.")?, flow::Transition::No)),
CommandBody::Capability => capability(ctx).await,
CommandBody::Login { username, password } => login(ctx, username, password).await,
_ => Ok((
Response::no("This command is not available in the ANONYMOUS state.")?,
- flow::Transition::No
+ flow::Transition::No,
)),
}
}
@@ -55,6 +56,6 @@ async fn login<'a>(
tracing::info!(username=%u, "connected");
Ok((
Response::ok("Completed")?,
- flow::Transition::Authenticate(user)
+ flow::Transition::Authenticate(user),
))
}