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
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ use cosmic::{
|
|||
Element, Task,
|
||||
};
|
||||
use logind_zbus::manager::ManagerProxy;
|
||||
use once_cell::sync::Lazy;
|
||||
use std::sync::LazyLock;
|
||||
use timedate_zbus::TimeDateProxy;
|
||||
use tokio::{sync::watch, time};
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ use cosmic::applet::token::subscription::{
|
|||
activation_token_subscription, TokenRequest, TokenUpdate,
|
||||
};
|
||||
|
||||
static AUTOSIZE_MAIN_ID: Lazy<Id> = Lazy::new(|| Id::new("autosize-main"));
|
||||
static AUTOSIZE_MAIN_ID: LazyLock<Id> = LazyLock::new(|| Id::new("autosize-main"));
|
||||
|
||||
/// In order to keep the understandable, the chrono types are not globals,
|
||||
/// to avoid conflict with icu
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue