clippy lint
This commit is contained in:
parent
a24c3fff54
commit
b52474cf66
1 changed files with 4 additions and 4 deletions
|
@ -156,14 +156,14 @@ impl Loader {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct TSParser {
|
pub struct TsParser {
|
||||||
parser: tree_sitter::Parser,
|
parser: tree_sitter::Parser,
|
||||||
cursors: Vec<QueryCursor>,
|
cursors: Vec<QueryCursor>,
|
||||||
}
|
}
|
||||||
|
|
||||||
// could also just use a pool, or a single instance?
|
// could also just use a pool, or a single instance?
|
||||||
thread_local! {
|
thread_local! {
|
||||||
pub static PARSER: RefCell<TSParser> = RefCell::new(TSParser {
|
pub static PARSER: RefCell<TsParser> = RefCell::new(TsParser {
|
||||||
parser: Parser::new(),
|
parser: Parser::new(),
|
||||||
cursors: Vec::new(),
|
cursors: Vec::new(),
|
||||||
})
|
})
|
||||||
|
@ -370,7 +370,7 @@ impl LanguageLayer {
|
||||||
|
|
||||||
fn parse(
|
fn parse(
|
||||||
&mut self,
|
&mut self,
|
||||||
ts_parser: &mut TSParser,
|
ts_parser: &mut TsParser,
|
||||||
config: &HighlightConfiguration,
|
config: &HighlightConfiguration,
|
||||||
source: &Rope,
|
source: &Rope,
|
||||||
mut depth: usize,
|
mut depth: usize,
|
||||||
|
@ -554,7 +554,7 @@ impl LanguageLayer {
|
||||||
|
|
||||||
fn update(
|
fn update(
|
||||||
&mut self,
|
&mut self,
|
||||||
ts_parser: &mut TSParser,
|
ts_parser: &mut TsParser,
|
||||||
config: &HighlightConfiguration,
|
config: &HighlightConfiguration,
|
||||||
old_source: &Rope,
|
old_source: &Rope,
|
||||||
source: &Rope,
|
source: &Rope,
|
||||||
|
|
Loading…
Add table
Reference in a new issue