From 0e8c3fe30fd7c9a9ff54d2f6d75324575df5511a Mon Sep 17 00:00:00 2001 From: Tommy Volk Date: Thu, 3 Oct 2024 22:27:25 -0500 Subject: chore: remove once_cell dependency --- examples/websocket/src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'examples/websocket/src/main.rs') 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 = Lazy::new(scrollable::Id::unique); +static MESSAGE_LOG: LazyLock = + LazyLock::new(scrollable::Id::unique); -- cgit From 2b8b3fd413b03d6b79f1de90bd42eb43c5cd6aa0 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 6 Jan 2025 23:00:21 +0100 Subject: Fix consistency of import ordering --- examples/websocket/src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'examples/websocket/src/main.rs') diff --git a/examples/websocket/src/main.rs b/examples/websocket/src/main.rs index 399ce2ff..ae658471 100644 --- a/examples/websocket/src/main.rs +++ b/examples/websocket/src/main.rs @@ -1,11 +1,10 @@ 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 std::sync::LazyLock; pub fn main() -> iced::Result { iced::application("WebSocket - Iced", WebSocket::update, WebSocket::view) -- cgit