diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-03-08 09:55:33 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-03-08 09:55:33 +0100 |
commit | 11462f80c4ae25696c7436ed7aacb92074d7e911 (patch) | |
tree | 333677df5ea981b0e1468b43fc00df9d242ad4fa /aero-sasl | |
parent | 1edf0b15ecaa73d55bb72c6f3c6e25d4f231f322 (diff) | |
download | aerogramme-11462f80c4ae25696c7436ed7aacb92074d7e911.tar.gz aerogramme-11462f80c4ae25696c7436ed7aacb92074d7e911.zip |
Re-enable proto
Diffstat (limited to 'aero-sasl')
-rw-r--r-- | aero-sasl/src/flow.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/aero-sasl/src/flow.rs b/aero-sasl/src/flow.rs index 6cc698a..31c8bc5 100644 --- a/aero-sasl/src/flow.rs +++ b/aero-sasl/src/flow.rs @@ -28,9 +28,9 @@ impl State { Self::Init } - async fn try_auth_plain<'a, X, F>(&self, data: &'a [u8], login: X) -> AuthRes + async fn try_auth_plain<X, F>(&self, data: &[u8], login: X) -> AuthRes where - X: FnOnce(&'a str, &'a str) -> F, + X: FnOnce(String, String) -> F, F: Future<Output=bool>, { // Check that we can extract user's login+pass @@ -56,7 +56,7 @@ impl State { }; // Try to connect user - match login(user, password).await { + match login(user.to_string(), password.to_string()).await { true => AuthRes::Success(user.to_string()), false => { tracing::warn!("login failed"); @@ -67,7 +67,7 @@ impl State { pub async fn progress<F,X>(&mut self, cmd: ClientCommand, login: X) where - X: FnOnce(&str, &str) -> F, + X: FnOnce(String, String) -> F, F: Future<Output=bool>, { let new_state = 'state: { |