From 93d6f748f69fc4ccf6c18f95c5f16b369c776da0 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 20 Sep 2023 01:13:36 +0200 Subject: Fix `clippy` lints in `iced_highlighter` --- highlighter/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'highlighter') diff --git a/highlighter/src/lib.rs b/highlighter/src/lib.rs index b80d6499..f5a4fae5 100644 --- a/highlighter/src/lib.rs +++ b/highlighter/src/lib.rs @@ -9,10 +9,10 @@ use syntect::highlighting; use syntect::parsing; static SYNTAXES: Lazy = - Lazy::new(|| parsing::SyntaxSet::load_defaults_nonewlines()); + Lazy::new(parsing::SyntaxSet::load_defaults_nonewlines); static THEMES: Lazy = - 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(), ) }); -- cgit