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/src | |
| parent | dfdc3144b61b6750ad62fb493b7c00c6c820c90b (diff) | |
| download | azalea-drasl-0817382098128adcecb77756a3c7cd1bd0066057.tar.xz | |
replace once_cell with std:;sync::LazyLock
Diffstat (limited to 'azalea-client/src')
| -rwxr-xr-x | azalea-client/src/chat.rs | 3 |
1 files changed, 1 insertions, 2 deletions
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()) }}; } |
