diff options
Diffstat (limited to 'highlighter')
-rw-r--r-- | highlighter/Cargo.toml | 1 | ||||
-rw-r--r-- | highlighter/src/lib.rs | 10 |
2 files changed, 5 insertions, 6 deletions
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<parsing::SyntaxSet> = - Lazy::new(parsing::SyntaxSet::load_defaults_nonewlines); +static SYNTAXES: LazyLock<parsing::SyntaxSet> = + LazyLock::new(parsing::SyntaxSet::load_defaults_nonewlines); -static THEMES: Lazy<highlighting::ThemeSet> = - Lazy::new(highlighting::ThemeSet::load_defaults); +static THEMES: LazyLock<highlighting::ThemeSet> = + LazyLock::new(highlighting::ThemeSet::load_defaults); const LINES_PER_SNAPSHOT: usize = 50; |