From 32dfd25f570b7a55bf43752684d286be0f6b2dc2 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Thu, 16 May 2024 17:38:34 +0200 Subject: format + WIP calendar-query --- aero-sasl/src/flow.rs | 18 +++++++++--------- aero-sasl/src/lib.rs | 6 +++--- aero-sasl/src/types.rs | 2 -- 3 files changed, 12 insertions(+), 14 deletions(-) (limited to 'aero-sasl') diff --git a/aero-sasl/src/flow.rs b/aero-sasl/src/flow.rs index 31c8bc5..5aa4869 100644 --- a/aero-sasl/src/flow.rs +++ b/aero-sasl/src/flow.rs @@ -1,8 +1,8 @@ use futures::Future; use rand::prelude::*; -use super::types::*; use super::decode::auth_plain; +use super::types::*; #[derive(Debug)] pub enum AuthRes { @@ -29,10 +29,10 @@ impl State { } async fn try_auth_plain(&self, data: &[u8], login: X) -> AuthRes - where - X: FnOnce(String, String) -> F, - F: Future, - { + where + X: FnOnce(String, String) -> F, + F: Future, + { // Check that we can extract user's login+pass let (ubin, pbin) = match auth_plain(&data) { Ok(([], (authz, user, pass))) if authz == user || authz == EMPTY_AUTHZ => (user, pass), @@ -65,10 +65,10 @@ impl State { } } - pub async fn progress(&mut self, cmd: ClientCommand, login: X) - where - X: FnOnce(String, String) -> F, - F: Future, + pub async fn progress(&mut self, cmd: ClientCommand, login: X) + where + X: FnOnce(String, String) -> F, + F: Future, { let new_state = 'state: { match (std::mem::replace(self, State::Error), cmd) { diff --git a/aero-sasl/src/lib.rs b/aero-sasl/src/lib.rs index 230862a..fdaa8a7 100644 --- a/aero-sasl/src/lib.rs +++ b/aero-sasl/src/lib.rs @@ -1,3 +1,6 @@ +pub mod decode; +pub mod encode; +pub mod flow; /// Seek compatibility with the Dovecot Authentication Protocol /// /// ## Trace @@ -38,6 +41,3 @@ /// https://doc.dovecot.org/configuration_manual/howto/simple_virtual_install/#simple-virtual-install-smtp-auth /// https://doc.dovecot.org/configuration_manual/howto/postfix_and_dovecot_sasl/#howto-postfix-and-dovecot-sasl pub mod types; -pub mod encode; -pub mod decode; -pub mod flow; diff --git a/aero-sasl/src/types.rs b/aero-sasl/src/types.rs index d71405e..2686677 100644 --- a/aero-sasl/src/types.rs +++ b/aero-sasl/src/types.rs @@ -159,5 +159,3 @@ pub enum ServerCommand { extra_parameters: Vec>, }, } - - -- cgit v1.2.3