From 96f5e80abbc92d5271b490842aabad8d2d963494 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 4 Sep 2019 10:01:46 +0200 Subject: [PATCH] src/client/http_client.rs: use async for login() --- src/client/http_client.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/http_client.rs b/src/client/http_client.rs index 7f098b5c..60faa69e 100644 --- a/src/client/http_client.rs +++ b/src/client/http_client.rs @@ -139,7 +139,7 @@ impl HttpClient { Ok(Self { client, server: String::from(server), - auth: BroadcastFuture::new(Box::new(login)), + auth: BroadcastFuture::new(Box::new(login_future)), }) } @@ -147,8 +147,8 @@ impl HttpClient { /// /// Login is done on demand, so this is onyl required if you need /// access to authentication data in 'AuthInfo'. - pub fn login(&self) -> impl Future> { - self.auth.listen() + pub async fn login(&self) -> Result { + self.auth.listen().await } fn get_password(_username: &str) -> Result {