summaryrefslogtreecommitdiffstats
path: root/graphics/src/text.rs
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/src/text.rs')
-rw-r--r--graphics/src/text.rs5
1 files changed, 2 insertions, 3 deletions
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 {