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.
  • Loading branch information
joshuamegnauth54 committed Sep 7, 2024
1 parent 0d9785a commit 3b14d14
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
name = "cosmic-app-template"
version = "0.1.0"
edition = "2021"
rust-version = "1.80"

[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 3b14d14

Please sign in to comment.