From 0e8c3fe30fd7c9a9ff54d2f6d75324575df5511a Mon Sep 17 00:00:00 2001 From: Tommy Volk Date: Thu, 3 Oct 2024 22:27:25 -0500 Subject: chore: remove once_cell dependency --- highlighter/Cargo.toml | 1 - highlighter/src/lib.rs | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'highlighter') diff --git a/highlighter/Cargo.toml b/highlighter/Cargo.toml index 7962b89d..4c20a678 100644 --- a/highlighter/Cargo.toml +++ b/highlighter/Cargo.toml @@ -16,5 +16,4 @@ workspace = true [dependencies] iced_core.workspace = true -once_cell.workspace = true syntect.workspace = true diff --git a/highlighter/src/lib.rs b/highlighter/src/lib.rs index 83a15cb1..d2abc6b1 100644 --- a/highlighter/src/lib.rs +++ b/highlighter/src/lib.rs @@ -5,16 +5,16 @@ use crate::core::font::{self, Font}; use crate::core::text::highlighter::{self, Format}; use crate::core::Color; -use once_cell::sync::Lazy; use std::ops::Range; +use std::sync::LazyLock; use syntect::highlighting; use syntect::parsing; -static SYNTAXES: Lazy = - Lazy::new(parsing::SyntaxSet::load_defaults_nonewlines); +static SYNTAXES: LazyLock = + LazyLock::new(parsing::SyntaxSet::load_defaults_nonewlines); -static THEMES: Lazy = - Lazy::new(highlighting::ThemeSet::load_defaults); +static THEMES: LazyLock = + LazyLock::new(highlighting::ThemeSet::load_defaults); const LINES_PER_SNAPSHOT: usize = 50; -- cgit