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
|
|
@ -39,10 +39,9 @@ use cosmic_settings_subscriptions::{
|
|||
},
|
||||
},
|
||||
};
|
||||
use cosmic_time::{anim, chain, id, once_cell::sync::Lazy, Instant, Timeline};
|
||||
use cosmic_time::{anim, chain, id, Instant, Timeline};
|
||||
|
||||
use cosmic::widget::text_input;
|
||||
use std::{collections::HashMap, path::PathBuf, time::Duration};
|
||||
use std::{collections::HashMap, path::PathBuf, sync::LazyLock, time::Duration};
|
||||
use tokio::sync::mpsc::UnboundedSender;
|
||||
|
||||
// XXX improve
|
||||
|
|
@ -65,7 +64,7 @@ pub fn run() -> cosmic::iced::Result {
|
|||
cosmic::applet::run::<CosmicBatteryApplet>(())
|
||||
}
|
||||
|
||||
static MAX_CHARGE: Lazy<id::Toggler> = Lazy::new(id::Toggler::unique);
|
||||
static MAX_CHARGE: LazyLock<id::Toggler> = LazyLock::new(id::Toggler::unique);
|
||||
|
||||
#[derive(Clone, Default)]
|
||||
struct GPUData {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue