chore: remove once_cell dependency
This commit is contained in:
parent
b156087fcf
commit
0e8c3fe30f
20 changed files with 80 additions and 96 deletions
|
|
@ -16,5 +16,4 @@ workspace = true
|
|||
[dependencies]
|
||||
iced_core.workspace = true
|
||||
|
||||
once_cell.workspace = true
|
||||
syntect.workspace = true
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue