summaryrefslogtreecommitdiffstats
path: root/highlighter
diff options
context:
space:
mode:
authorLibravatar Tommy Volk <tvolk131@gmail.com>2024-10-03 22:27:25 -0500
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2025-01-06 22:56:48 +0100
commit0e8c3fe30fd7c9a9ff54d2f6d75324575df5511a (patch)
treea0d28dac23fef014f602ddd7eafe1ef1eea39d9f /highlighter
parentb156087fcf10011b2ee53c74198ba9fc443a1caa (diff)
downloadiced-0e8c3fe30fd7c9a9ff54d2f6d75324575df5511a.tar.gz
iced-0e8c3fe30fd7c9a9ff54d2f6d75324575df5511a.tar.bz2
iced-0e8c3fe30fd7c9a9ff54d2f6d75324575df5511a.zip
chore: remove once_cell dependency
Diffstat (limited to 'highlighter')
-rw-r--r--highlighter/Cargo.toml1
-rw-r--r--highlighter/src/lib.rs10
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;