chore: remove once_cell dependency
This commit is contained in:
parent
b156087fcf
commit
0e8c3fe30f
20 changed files with 80 additions and 96 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue