Fix clippy lints in iced_highlighter

This commit is contained in:
Héctor Ramón Jiménez 2023-09-20 01:13:36 +02:00
parent be340a8cd8
commit 93d6f748f6
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -9,10 +9,10 @@ use syntect::highlighting;
use syntect::parsing;
static SYNTAXES: Lazy<parsing::SyntaxSet> =
Lazy::new(|| parsing::SyntaxSet::load_defaults_nonewlines());
Lazy::new(parsing::SyntaxSet::load_defaults_nonewlines);
static THEMES: Lazy<highlighting::ThemeSet> =
Lazy::new(|| highlighting::ThemeSet::load_defaults());
Lazy::new(highlighting::ThemeSet::load_defaults);
const LINES_PER_SNAPSHOT: usize = 50;
@ -77,7 +77,7 @@ impl highlighter::Highlighter for Highlighter {
let (parser, stack) =
self.caches.last().cloned().unwrap_or_else(|| {
(
parsing::ParseState::new(&self.syntax),
parsing::ParseState::new(self.syntax),
parsing::ScopeStack::new(),
)
});