From e02b10d9b47ee17490a877b831580b13c5243b22 Mon Sep 17 00:00:00 2001 From: Josh Megnauth Date: Sat, 7 Sep 2024 02:36:48 -0400 Subject: [PATCH] chore: Use Rust 1.80; drop once_cell `libcosmic` already requires Rust 1.80 so `once_cell` isn't required anymore. --- Cargo.toml | 1 - src/i18n.rs | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 81ef1e4..a380e61 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,6 @@ edition = "2021" [dependencies] futures-util = "0.3.30" i18n-embed-fl = "0.9.1" -once_cell = "1.19.0" open = "5.3.0" rust-embed = "8.5.0" tokio = { version = "1.40.0", features = ["full"] } diff --git a/src/i18n.rs b/src/i18n.rs index 71783d5..d180c18 100644 --- a/src/i18n.rs +++ b/src/i18n.rs @@ -2,12 +2,13 @@ //! Provides localization support for this crate. +use std::sync::LazyLock; + use i18n_embed::{ fluent::{fluent_language_loader, FluentLanguageLoader}, unic_langid::LanguageIdentifier, DefaultLocalizer, LanguageLoader, Localizer, }; -use once_cell::sync::Lazy; use rust_embed::RustEmbed; /// Applies the requested language(s) to requested translations from the `fl!()` macro. @@ -27,7 +28,7 @@ pub fn localizer() -> Box { #[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