From 11462f80c4ae25696c7436ed7aacb92074d7e911 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Fri, 8 Mar 2024 09:55:33 +0100 Subject: Re-enable proto --- aero-sasl/src/flow.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'aero-sasl') 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(&self, data: &[u8], login: X) -> AuthRes where - X: FnOnce(&'a str, &'a str) -> F, + X: FnOnce(String, String) -> F, F: Future, { // 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(&mut self, cmd: ClientCommand, login: X) where - X: FnOnce(&str, &str) -> F, + X: FnOnce(String, String) -> F, F: Future, { let new_state = 'state: { -- cgit v1.2.3