chore: use std::sync::LazyLock
Removes `once_cell` as a direct dependency.
This commit is contained in:
parent
467716c167
commit
c3fafd3910
42 changed files with 77 additions and 106 deletions
|
|
@ -12,7 +12,6 @@ cosmic-protocols.workspace = true
|
|||
tracing.workspace = true
|
||||
tracing-subscriber.workspace = true
|
||||
tracing-log.workspace = true
|
||||
once_cell = "1.20"
|
||||
futures.workspace = true
|
||||
anyhow.workspace = true
|
||||
tokio.workspace = true
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@ use cosmic::{
|
|||
Element, Task, Theme,
|
||||
};
|
||||
|
||||
use once_cell::sync::Lazy;
|
||||
|
||||
use crate::{
|
||||
config,
|
||||
wayland::WorkspaceEvent,
|
||||
|
|
@ -37,10 +35,11 @@ use crate::{
|
|||
|
||||
use std::{
|
||||
process::Command as ShellCommand,
|
||||
sync::LazyLock,
|
||||
time::{Duration, Instant},
|
||||
};
|
||||
|
||||
static AUTOSIZE_MAIN_ID: Lazy<Id> = Lazy::new(|| Id::new("autosize-main"));
|
||||
static AUTOSIZE_MAIN_ID: LazyLock<Id> = LazyLock::new(|| Id::new("autosize-main"));
|
||||
|
||||
pub fn run() -> cosmic::iced::Result {
|
||||
cosmic::applet::run::<IcedWorkspacesApplet>(())
|
||||
|
|
|
|||
|
|
@ -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<FluentLanguageLoader> = Lazy::new(|| {
|
||||
pub static LANGUAGE_LOADER: LazyLock<FluentLanguageLoader> = LazyLock::new(|| {
|
||||
let loader: FluentLanguageLoader = fluent_language_loader!();
|
||||
|
||||
loader
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@ use cosmic::iced::{
|
|||
futures::{channel::mpsc, SinkExt, StreamExt},
|
||||
stream, Subscription,
|
||||
};
|
||||
use once_cell::sync::Lazy;
|
||||
use std::sync::LazyLock;
|
||||
use tokio::sync::Mutex;
|
||||
|
||||
pub static WAYLAND_RX: Lazy<Mutex<Option<mpsc::Receiver<Vec<Workspace>>>>> =
|
||||
Lazy::new(|| Mutex::new(None));
|
||||
pub static WAYLAND_RX: LazyLock<Mutex<Option<mpsc::Receiver<Vec<Workspace>>>>> =
|
||||
LazyLock::new(|| Mutex::new(None));
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum WorkspacesUpdate {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue