diff options
| author | mat <git@matdoes.dev> | 2024-11-27 10:26:40 +0000 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2024-11-27 10:26:40 +0000 |
| commit | 0817382098128adcecb77756a3c7cd1bd0066057 (patch) | |
| tree | 623d9b297f9b5fdb2af74ab3c5a4fa5c1b72ff5b /azalea-auth | |
| parent | dfdc3144b61b6750ad62fb493b7c00c6c820c90b (diff) | |
| download | azalea-drasl-0817382098128adcecb77756a3c7cd1bd0066057.tar.xz | |
replace once_cell with std:;sync::LazyLock
Diffstat (limited to 'azalea-auth')
| -rw-r--r-- | azalea-auth/Cargo.toml | 2 | ||||
| -rwxr-xr-x | azalea-auth/src/sessionserver.rs | 5 |
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 |
