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-client | |
| parent | dfdc3144b61b6750ad62fb493b7c00c6c820c90b (diff) | |
| download | azalea-drasl-0817382098128adcecb77756a3c7cd1bd0066057.tar.xz | |
replace once_cell with std:;sync::LazyLock
Diffstat (limited to 'azalea-client')
| -rw-r--r-- | azalea-client/Cargo.toml | 6 | ||||
| -rwxr-xr-x | azalea-client/src/chat.rs | 3 |
2 files changed, 1 insertions, 8 deletions
diff --git a/azalea-client/Cargo.toml b/azalea-client/Cargo.toml index 371e2d3b..ee1e400a 100644 --- a/azalea-client/Cargo.toml +++ b/azalea-client/Cargo.toml @@ -10,7 +10,6 @@ version = "0.10.3+mc1.21.1" [dependencies] anyhow = { workspace = true } -#async-trait = { workspace = true } azalea-auth = { path = "../azalea-auth", version = "0.10.0" } azalea-block = { path = "../azalea-block", version = "0.10.0" } azalea-buf = { path = "../azalea-buf", version = "0.10.0" } @@ -29,15 +28,10 @@ bevy_log = { workspace = true, optional = true } bevy_tasks = { workspace = true } bevy_time = { workspace = true } derive_more = { workspace = true, features = ["deref", "deref_mut"] } -#futures = { workspace = true } minecraft_folder_path = { workspace = true } -#nohash-hasher = { workspace = true } -once_cell = { workspace = true } parking_lot = { workspace = true, features = ["deadlock_detection"] } regex = { workspace = true } reqwest = { workspace = true } -#serde = { workspace = true } -#serde_json = { workspace = true } simdnbt = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true, features = ["sync"] } diff --git a/azalea-client/src/chat.rs b/azalea-client/src/chat.rs index 1f69d46e..80c52baf 100755 --- a/azalea-client/src/chat.rs +++ b/azalea-client/src/chat.rs @@ -37,8 +37,7 @@ pub enum ChatPacket { macro_rules! regex { ($re:literal $(,)?) => {{ - static RE: once_cell::sync::OnceCell<regex::Regex> = once_cell::sync::OnceCell::new(); - RE.get_or_init(|| regex::Regex::new($re).unwrap()) + std::sync::LazyLock::new(|| regex::Regex::new($re).unwrap()) }}; } |
