aboutsummaryrefslogtreecommitdiff
path: root/azalea-auth
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2024-11-27 10:26:40 +0000
committermat <git@matdoes.dev>2024-11-27 10:26:40 +0000
commit0817382098128adcecb77756a3c7cd1bd0066057 (patch)
tree623d9b297f9b5fdb2af74ab3c5a4fa5c1b72ff5b /azalea-auth
parentdfdc3144b61b6750ad62fb493b7c00c6c820c90b (diff)
downloadazalea-drasl-0817382098128adcecb77756a3c7cd1bd0066057.tar.xz
replace once_cell with std:;sync::LazyLock
Diffstat (limited to 'azalea-auth')
-rw-r--r--azalea-auth/Cargo.toml2
-rwxr-xr-xazalea-auth/src/sessionserver.rs5
2 files changed, 3 insertions, 4 deletions
diff --git a/azalea-auth/Cargo.toml b/azalea-auth/Cargo.toml
index 7eb38c19..6573081d 100644
--- a/azalea-auth/Cargo.toml
+++ b/azalea-auth/Cargo.toml
@@ -14,8 +14,6 @@ azalea-crypto = { path = "../azalea-crypto", version = "0.10.0" }
base64 = { workspace = true }
chrono = { workspace = true, features = ["serde"] }
md-5 = { workspace = true }
-#num-bigint = { workspace = true }
-once_cell = { workspace = true }
reqwest = { workspace = true, features = ["json", "rustls-tls"] }
rsa = { workspace = true }
serde = { workspace = true, features = ["derive"] }
diff --git a/azalea-auth/src/sessionserver.rs b/azalea-auth/src/sessionserver.rs
index 9c73fbf0..e7052e11 100755
--- a/azalea-auth/src/sessionserver.rs
+++ b/azalea-auth/src/sessionserver.rs
@@ -1,5 +1,6 @@
//! Tell Mojang you're joining a multiplayer server.
-use once_cell::sync::Lazy;
+use std::sync::LazyLock;
+
use reqwest::StatusCode;
use serde::Deserialize;
use serde_json::json;
@@ -49,7 +50,7 @@ pub struct ForbiddenError {
pub path: String,
}
-static REQWEST_CLIENT: Lazy<reqwest::Client> = Lazy::new(reqwest::Client::new);
+static REQWEST_CLIENT: LazyLock<reqwest::Client> = LazyLock::new(reqwest::Client::new);
/// Tell Mojang's servers that you are going to join a multiplayer server,
/// which is required to join online-mode servers. The server ID is an empty