summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorLibravatar Héctor <hector@hecrj.dev>2025-01-06 23:09:15 +0100
committerLibravatar GitHub <noreply@github.com>2025-01-06 23:09:15 +0100
commit717b296cdb17f22b410e2985b58e73af2199bfcc (patch)
tree6be1fe93925ea087e4f042119cc52a9e70c40d21 /graphics
parent634365564ea2bb2284561e8d300cf77a6f7db565 (diff)
parent2b8b3fd413b03d6b79f1de90bd42eb43c5cd6aa0 (diff)
downloadiced-717b296cdb17f22b410e2985b58e73af2199bfcc.tar.gz
iced-717b296cdb17f22b410e2985b58e73af2199bfcc.tar.bz2
iced-717b296cdb17f22b410e2985b58e73af2199bfcc.zip
Merge pull request #2626 from tvolk131/remove_once_cell
chore: remove once_cell dependency
Diffstat (limited to '')
-rw-r--r--graphics/Cargo.toml1
-rw-r--r--graphics/src/text.rs5
2 files changed, 2 insertions, 4 deletions
diff --git a/graphics/Cargo.toml b/graphics/Cargo.toml
index 7e2d767b..43191a59 100644
--- a/graphics/Cargo.toml
+++ b/graphics/Cargo.toml
@@ -33,7 +33,6 @@ bytemuck.workspace = true
cosmic-text.workspace = true
half.workspace = true
log.workspace = true
-once_cell.workspace = true
raw-window-handle.workspace = true
rustc-hash.workspace = true
thiserror.workspace = true
diff --git a/graphics/src/text.rs b/graphics/src/text.rs
index ca3fc6fc..7694ff1f 100644
--- a/graphics/src/text.rs
+++ b/graphics/src/text.rs
@@ -14,10 +14,9 @@ use crate::core::font::{self, Font};
use crate::core::text::{Shaping, Wrapping};
use crate::core::{Color, Pixels, Point, Rectangle, Size, Transformation};
-use once_cell::sync::OnceCell;
use std::borrow::Cow;
use std::collections::HashSet;
-use std::sync::{Arc, RwLock, Weak};
+use std::sync::{Arc, OnceLock, RwLock, Weak};
/// A text primitive.
#[derive(Debug, Clone, PartialEq)]
@@ -157,7 +156,7 @@ pub const FIRA_SANS_REGULAR: &[u8] =
/// Returns the global [`FontSystem`].
pub fn font_system() -> &'static RwLock<FontSystem> {
- static FONT_SYSTEM: OnceCell<RwLock<FontSystem>> = OnceCell::new();
+ static FONT_SYSTEM: OnceLock<RwLock<FontSystem>> = OnceLock::new();
FONT_SYSTEM.get_or_init(|| {
RwLock::new(FontSystem {