From 34f53baf85fb5c7163ec5d71a8ab9d45d3f271b6 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 22 Feb 2025 23:01:54 +0000 Subject: update to rust edition 2024 --- azalea-auth/src/auth.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'azalea-auth/src/auth.rs') diff --git a/azalea-auth/src/auth.rs b/azalea-auth/src/auth.rs index 55d7d36a..99dfc115 100755 --- a/azalea-auth/src/auth.rs +++ b/azalea-auth/src/auth.rs @@ -360,7 +360,7 @@ pub async fn get_ms_auth_token( tokio::time::sleep(std::time::Duration::from_secs(res.interval)).await; trace!("Polling to check if user has logged in..."); - if let Ok(access_token_response) = client + let res = client .post(format!( "https://login.live.com/oauth20_token.srf?client_id={client_id}" )) @@ -372,8 +372,8 @@ pub async fn get_ms_auth_token( .send() .await? .json::() - .await - { + .await; + if let Ok(access_token_response) = res { trace!("access_token_response: {:?}", access_token_response); let expires_at = SystemTime::now() + std::time::Duration::from_secs(access_token_response.expires_in); -- cgit v1.2.3