Skip to content

Commit

Permalink
chore: Use Rust 1.80; drop once_cell
Browse files Browse the repository at this point in the history
`libcosmic` already requires Rust 1.80 so `once_cell` isn't required
anymore.
  • Loading branch information
joshuamegnauth54 committed Sep 17, 2024
1 parent 0d9785a commit e02b10d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
5 changes: 3 additions & 2 deletions src/i18n.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -27,7 +28,7 @@ pub fn localizer() -> Box<dyn Localizer> {
#[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
Expand Down

0 comments on commit e02b10d

Please sign in to comment.