Skip to content

Commit

Permalink
Use std oncelock
Browse files Browse the repository at this point in the history
  • Loading branch information
tarkah committed Jun 26, 2023
1 parent 9ece059 commit 97e8434
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ chrono = { version = "0.4", features = ['serde'] }
fern = "0.6.1"
iced = { version = "0.9", features = ["tokio", "lazy", "advanced", "image"] }
log = "0.4.16"
once_cell = "1.18.0"
palette = "=0.7.2"
thiserror = "1.0.30"
tokio = { version = "1.0", features = ["rt", "fs", "process"] }
Expand Down
7 changes: 4 additions & 3 deletions src/font.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::sync::OnceLock;

use data::Config;
use once_cell::sync::OnceCell;

use iced::font::{self, Error};
use iced::Command;
Expand All @@ -14,14 +15,14 @@ pub const ICON: iced::Font = iced::Font {
#[derive(Debug, Clone)]
pub struct Font {
bold: bool,
inner: OnceCell<iced::Font>,
inner: OnceLock<iced::Font>,
}

impl Font {
const fn new(bold: bool) -> Self {
Self {
bold,
inner: OnceCell::new(),
inner: OnceLock::new(),
}
}

Expand Down

0 comments on commit 97e8434

Please sign in to comment.