summaryrefslogtreecommitdiffstats
path: root/highlighter
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-09-20 01:13:36 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-09-20 01:13:36 +0200
commit93d6f748f69fc4ccf6c18f95c5f16b369c776da0 (patch)
treed146ae310004789d32c2b665bb5a6173e451ea35 /highlighter
parentbe340a8cd822be1ea0fe4c1b1f3a62ca66d705b4 (diff)
downloadiced-93d6f748f69fc4ccf6c18f95c5f16b369c776da0.tar.gz
iced-93d6f748f69fc4ccf6c18f95c5f16b369c776da0.tar.bz2
iced-93d6f748f69fc4ccf6c18f95c5f16b369c776da0.zip
Fix `clippy` lints in `iced_highlighter`
Diffstat (limited to 'highlighter')
-rw-r--r--highlighter/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
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<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(),
)
});