From 91e3cd6a40aa98cf9a76e7cd3534f7fbb0a27098 Mon Sep 17 00:00:00 2001 From: Philip Dubé Date: Fri, 29 Dec 2023 01:40:18 +0000 Subject: Remove direct dependency on once_cell With MSRV 1.70, std now contains the necessary parts. --- alacritty/src/renderer/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'alacritty/src/renderer') diff --git a/alacritty/src/renderer/mod.rs b/alacritty/src/renderer/mod.rs index d8fd64fa..02bfd762 100644 --- a/alacritty/src/renderer/mod.rs +++ b/alacritty/src/renderer/mod.rs @@ -2,6 +2,7 @@ use std::borrow::Cow; use std::collections::HashSet; use std::ffi::{CStr, CString}; use std::sync::atomic::{AtomicBool, Ordering}; +use std::sync::OnceLock; use std::{fmt, ptr}; use ahash::RandomState; @@ -9,7 +10,6 @@ use crossfont::Metrics; use glutin::context::{ContextApi, GlContext, PossiblyCurrentContext}; use glutin::display::{GetGlDisplay, GlDisplay}; use log::{debug, error, info, warn, LevelFilter}; -use once_cell::sync::OnceCell; use unicode_width::UnicodeWidthChar; use alacritty_terminal::index::Point; @@ -318,7 +318,7 @@ impl GlExtensions { /// /// This function will lazily load OpenGL extensions. fn contains(extension: &str) -> bool { - static OPENGL_EXTENSIONS: OnceCell> = OnceCell::new(); + static OPENGL_EXTENSIONS: OnceLock> = OnceLock::new(); OPENGL_EXTENSIONS.get_or_init(Self::load_extensions).contains(extension) } -- cgit