diff options
author | 2022-11-01 20:18:42 +0100 | |
---|---|---|
committer | 2022-11-01 20:18:42 +0100 | |
commit | 1c00adad615f7c2909d175c696765dbe081bde33 (patch) | |
tree | 76ac2acb891cdf6cde7b00e33da600837cfcc97f /examples/todos/src | |
parent | 37c5b15f62ef44e52e49032a2972a76aa653436a (diff) | |
parent | 743a7192b70bc5184aa47e7851098b75b8a1f288 (diff) | |
download | iced-1c00adad615f7c2909d175c696765dbe081bde33.tar.gz iced-1c00adad615f7c2909d175c696765dbe081bde33.tar.bz2 iced-1c00adad615f7c2909d175c696765dbe081bde33.zip |
Merge pull request #1497 from ids1024/once_cell
Use `once_cell` instead of `lazy_static`
Diffstat (limited to 'examples/todos/src')
-rw-r--r-- | examples/todos/src/main.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/todos/src/main.rs b/examples/todos/src/main.rs index bddc0e71..be48ae8c 100644 --- a/examples/todos/src/main.rs +++ b/examples/todos/src/main.rs @@ -11,12 +11,10 @@ use iced::window; use iced::{Application, Element}; use iced::{Color, Command, Font, Length, Settings, Subscription}; -use lazy_static::lazy_static; +use once_cell::sync::Lazy; use serde::{Deserialize, Serialize}; -lazy_static! { - static ref INPUT_ID: text_input::Id = text_input::Id::unique(); -} +static INPUT_ID: Lazy<text_input::Id> = Lazy::new(text_input::Id::unique); pub fn main() -> iced::Result { Todos::run(Settings { |