diff options
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()) }}; } |
