diff options
Diffstat (limited to 'azalea-protocol/examples')
| -rw-r--r-- | azalea-protocol/examples/handshake_proxy.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/azalea-protocol/examples/handshake_proxy.rs b/azalea-protocol/examples/handshake_proxy.rs index 8e675c58..14e5115e 100644 --- a/azalea-protocol/examples/handshake_proxy.rs +++ b/azalea-protocol/examples/handshake_proxy.rs @@ -1,7 +1,7 @@ //! A "simple" server that gets login information and proxies connections. //! After login all connections are encrypted and Azalea cannot read them. -use std::error::Error; +use std::{error::Error, sync::LazyLock}; use azalea_protocol::{ connect::Connection, @@ -23,7 +23,6 @@ use azalea_protocol::{ read::ReadPacketError, }; use futures::FutureExt; -use once_cell::sync::Lazy; use tokio::{ io::{self, AsyncWriteExt}, net::{TcpListener, TcpStream}, @@ -37,9 +36,9 @@ const PROXY_ADDR: &str = "127.0.0.1:25565"; const PROXY_DESC: &str = "An Azalea Minecraft Proxy"; // String must be formatted like "data:image/png;base64,<data>" -static PROXY_FAVICON: Lazy<Option<String>> = Lazy::new(|| None); +static PROXY_FAVICON: LazyLock<Option<String>> = LazyLock::new(|| None); -static PROXY_VERSION: Lazy<Version> = Lazy::new(|| Version { +static PROXY_VERSION: LazyLock<Version> = LazyLock::new(|| Version { name: "1.19.3".to_string(), protocol: PROTOCOL_VERSION, }); |
