diff --git a/Cargo.lock b/Cargo.lock index 981876c..a5daf3d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1274,7 +1274,6 @@ dependencies = [ "libcosmic", "log", "memmap2 0.9.5", - "once_cell", "rust-embed", "rustix 0.38.43", "tokio", diff --git a/Cargo.toml b/Cargo.toml index 57224a8..3894a69 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,6 @@ memmap2 = "0.9.0" tokio = "1.23.0" wayland-protocols = "0.32.1" zbus = { version = "4.0.0", default-features = false, features = ["tokio"] } -once_cell = "1.18.0" delegate = "0.13.0" itertools = "0.14.0" log = "0.4.20" diff --git a/src/localize.rs b/src/localize.rs index 263c17f..3df3371 100644 --- a/src/localize.rs +++ b/src/localize.rs @@ -5,14 +5,14 @@ use i18n_embed::{ fluent::{fluent_language_loader, FluentLanguageLoader}, DefaultLocalizer, LanguageLoader, Localizer, }; -use once_cell::sync::Lazy; use rust_embed::RustEmbed; +use std::sync::LazyLock; #[derive(RustEmbed)] #[folder = "i18n/"] struct Localizations; -pub static LANGUAGE_LOADER: Lazy = Lazy::new(|| { +pub static LANGUAGE_LOADER: LazyLock = LazyLock::new(|| { let loader: FluentLanguageLoader = fluent_language_loader!(); loader diff --git a/src/main.rs b/src/main.rs index a2d96c0..04f97f8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,13 +30,13 @@ use cosmic::{ use cosmic_comp_config::CosmicCompConfig; use cosmic_config::{cosmic_config_derive::CosmicConfigEntry, CosmicConfigEntry}; use i18n_embed::DesktopLanguageRequester; -use once_cell::sync::Lazy; use std::{ borrow::Cow, collections::{HashMap, HashSet}, mem, path::PathBuf, str, + sync::LazyLock, }; mod desktop_info; @@ -57,11 +57,11 @@ struct CosmicWorkspacesConfig { // Include `pid` in mime. Want to drag between our surfaces, but not another // process, if we use Wayland object ids. #[allow(dead_code)] -static WORKSPACE_MIME: Lazy = - Lazy::new(|| format!("text/x.cosmic-workspace-id-{}", std::process::id())); +static WORKSPACE_MIME: LazyLock = + LazyLock::new(|| format!("text/x.cosmic-workspace-id-{}", std::process::id())); -static TOPLEVEL_MIME: Lazy = - Lazy::new(|| format!("text/x.cosmic-toplevel-id-{}", std::process::id())); +static TOPLEVEL_MIME: LazyLock = + LazyLock::new(|| format!("text/x.cosmic-toplevel-id-{}", std::process::id())); #[derive(Parser, Debug, Clone)] #[command(author, version, about, long_about = None)]