diff options
| author | 2025-01-06 23:09:15 +0100 | |
|---|---|---|
| committer | 2025-01-06 23:09:15 +0100 | |
| commit | 717b296cdb17f22b410e2985b58e73af2199bfcc (patch) | |
| tree | 6be1fe93925ea087e4f042119cc52a9e70c40d21 /highlighter/src | |
| parent | 634365564ea2bb2284561e8d300cf77a6f7db565 (diff) | |
| parent | 2b8b3fd413b03d6b79f1de90bd42eb43c5cd6aa0 (diff) | |
| download | iced-717b296cdb17f22b410e2985b58e73af2199bfcc.tar.gz iced-717b296cdb17f22b410e2985b58e73af2199bfcc.tar.bz2 iced-717b296cdb17f22b410e2985b58e73af2199bfcc.zip | |
Merge pull request #2626 from tvolk131/remove_once_cell
chore: remove once_cell dependency
Diffstat (limited to 'highlighter/src')
| -rw-r--r-- | highlighter/src/lib.rs | 10 | 
1 files changed, 5 insertions, 5 deletions
| 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; | 
