diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-05-16 17:38:34 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-05-16 17:38:34 +0200 |
commit | 32dfd25f570b7a55bf43752684d286be0f6b2dc2 (patch) | |
tree | dd77871cda851bb5795743a3f04be61cf4c3ad61 /aero-sasl/src/flow.rs | |
parent | 6b9542088cd1b66af46e95b787493b601accb495 (diff) | |
download | aerogramme-32dfd25f570b7a55bf43752684d286be0f6b2dc2.tar.gz aerogramme-32dfd25f570b7a55bf43752684d286be0f6b2dc2.zip |
format + WIP calendar-query
Diffstat (limited to 'aero-sasl/src/flow.rs')
-rw-r--r-- | aero-sasl/src/flow.rs | 18 |
1 files changed, 9 insertions, 9 deletions
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<X, F>(&self, data: &[u8], login: X) -> AuthRes - where - X: FnOnce(String, String) -> F, - F: Future<Output=bool>, - { + where + X: FnOnce(String, String) -> F, + F: Future<Output = bool>, + { // 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<F,X>(&mut self, cmd: ClientCommand, login: X) - where - X: FnOnce(String, String) -> F, - F: Future<Output=bool>, + pub async fn progress<F, X>(&mut self, cmd: ClientCommand, login: X) + where + X: FnOnce(String, String) -> F, + F: Future<Output = bool>, { let new_state = 'state: { match (std::mem::replace(self, State::Error), cmd) { |