aboutsummaryrefslogtreecommitdiff
path: root/azalea-auth/src
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-10-27 21:22:47 -0500
committermat <github@matdoes.dev>2022-10-27 21:22:47 -0500
commit9de6c03dfbaa08890b1ec8322a97b7097d4a9d37 (patch)
treef8a2e96893036b32ab2299df49fa5b88fb5187da /azalea-auth/src
parent7ae8bfab5095b8d6fe71f32a0b1cda8a47ccff94 (diff)
downloadazalea-drasl-9de6c03dfbaa08890b1ec8322a97b7097d4a9d37.tar.xz
use variables directly in format strings
thanks clippy we love you
Diffstat (limited to 'azalea-auth/src')
-rw-r--r--azalea-auth/src/auth.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/azalea-auth/src/auth.rs b/azalea-auth/src/auth.rs
index 0d7c7ace..0b043baf 100644
--- a/azalea-auth/src/auth.rs
+++ b/azalea-auth/src/auth.rs
@@ -336,7 +336,7 @@ async fn auth_with_xbox_live(
"SiteName": "user.auth.xboxlive.com",
// i thought this was supposed to be d={} but it doesn't work for
// me when i add it ??????
- "RpsTicket": format!("{}", access_token)
+ "RpsTicket": format!("{access_token}")
},
"RelyingParty": "http://auth.xboxlive.com",
"TokenType": "JWT"
@@ -359,7 +359,7 @@ async fn auth_with_xbox_live(
// not_after looks like 2020-12-21T19:52:08.4463796Z
let expires_at = DateTime::parse_from_rfc3339(&res.not_after)
- .map_err(|e| XboxLiveAuthError::InvalidExpiryDate(format!("{}: {}", res.not_after, e)))?
+ .map_err(|e| XboxLiveAuthError::InvalidExpiryDate(format!("{}: {e}", res.not_after)))?
.with_timezone(&Utc)
.timestamp() as u64;
Ok(ExpiringValue {
@@ -416,7 +416,7 @@ async fn auth_with_minecraft(
.post("https://api.minecraftservices.com/authentication/login_with_xbox")
.header("Accept", "application/json")
.json(&json!({
- "identityToken": format!("XBL3.0 x={};{}", user_hash, xsts_token)
+ "identityToken": format!("XBL3.0 x={user_hash};{xsts_token}")
}))
.send()
.await?
@@ -446,7 +446,7 @@ async fn check_ownership(
.get("https://api.minecraftservices.com/entitlements/mcstore")
.header(
"Authorization",
- format!("Bearer {}", minecraft_access_token),
+ format!("Bearer {minecraft_access_token}"),
)
.send()
.await?
@@ -474,7 +474,7 @@ async fn get_profile(
.get("https://api.minecraftservices.com/minecraft/profile")
.header(
"Authorization",
- format!("Bearer {}", minecraft_access_token),
+ format!("Bearer {minecraft_access_token}"),
)
.send()
.await?