diff options
author | 2024-10-03 22:27:25 -0500 | |
---|---|---|
committer | 2025-01-06 22:56:48 +0100 | |
commit | 0e8c3fe30fd7c9a9ff54d2f6d75324575df5511a (patch) | |
tree | a0d28dac23fef014f602ddd7eafe1ef1eea39d9f /examples/websocket | |
parent | b156087fcf10011b2ee53c74198ba9fc443a1caa (diff) | |
download | iced-0e8c3fe30fd7c9a9ff54d2f6d75324575df5511a.tar.gz iced-0e8c3fe30fd7c9a9ff54d2f6d75324575df5511a.tar.bz2 iced-0e8c3fe30fd7c9a9ff54d2f6d75324575df5511a.zip |
chore: remove once_cell dependency
Diffstat (limited to 'examples/websocket')
-rw-r--r-- | examples/websocket/Cargo.toml | 1 | ||||
-rw-r--r-- | examples/websocket/src/main.rs | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/examples/websocket/Cargo.toml b/examples/websocket/Cargo.toml index c7075fb3..787dbbe1 100644 --- a/examples/websocket/Cargo.toml +++ b/examples/websocket/Cargo.toml @@ -9,7 +9,6 @@ publish = false iced.workspace = true iced.features = ["debug", "tokio"] -once_cell.workspace = true warp = "0.3" [dependencies.async-tungstenite] diff --git a/examples/websocket/src/main.rs b/examples/websocket/src/main.rs index 8b1efb41..399ce2ff 100644 --- a/examples/websocket/src/main.rs +++ b/examples/websocket/src/main.rs @@ -1,10 +1,11 @@ mod echo; +use std::sync::LazyLock; + use iced::widget::{ self, button, center, column, row, scrollable, text, text_input, }; use iced::{color, Center, Element, Fill, Subscription, Task}; -use once_cell::sync::Lazy; pub fn main() -> iced::Result { iced::application("WebSocket - Iced", WebSocket::update, WebSocket::view) @@ -138,4 +139,5 @@ enum State { Connected(echo::Connection), } -static MESSAGE_LOG: Lazy<scrollable::Id> = Lazy::new(scrollable::Id::unique); +static MESSAGE_LOG: LazyLock<scrollable::Id> = + LazyLock::new(scrollable::Id::unique); |