diff options
author | Blaž Hrastnik | 2020-09-29 09:02:27 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2020-09-29 09:07:05 +0000 |
commit | 3feb00283df92b8865c9cf7baba0e2ab06dcc028 (patch) | |
tree | c174b36de7866b7710a7f29cca95d9f6be66dcaa /helix-core/src/syntax.rs | |
parent | 1bb01d27aed8b046ff1cb41d4932c303d3b4ad0d (diff) |
clippy warnings
Diffstat (limited to 'helix-core/src/syntax.rs')
-rw-r--r-- | helix-core/src/syntax.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs index 3d85ff25..638ec8ee 100644 --- a/helix-core/src/syntax.rs +++ b/helix-core/src/syntax.rs @@ -37,11 +37,11 @@ impl LanguageConfiguration { let highlights_query = std::fs::read_to_string(self.path.join("queries/highlights.scm")) - .unwrap_or(String::new()); + .unwrap_or_default(); let injections_query = std::fs::read_to_string(self.path.join("queries/injections.scm")) - .unwrap_or(String::new()); + .unwrap_or_default(); let locals_query = ""; @@ -66,7 +66,7 @@ impl LanguageConfiguration { use once_cell::sync::Lazy; -pub(crate) static LOADER: Lazy<Loader> = Lazy::new(|| Loader::init()); +pub(crate) static LOADER: Lazy<Loader> = Lazy::new(Loader::init); pub struct Loader { // highlight_names ? @@ -159,7 +159,7 @@ impl Syntax { // let grammar = get_language(&language); let parser = Parser::new(); - let root_layer = LanguageLayer::new(); + let root_layer = LanguageLayer { tree: None }; // track markers of injections // track scope_descriptor: a Vec of scopes for item in tree @@ -317,9 +317,9 @@ use crate::transaction::{ChangeSet, Operation}; use crate::Tendril; impl LanguageLayer { - pub fn new() -> Self { - Self { tree: None } - } + // pub fn new() -> Self { + // Self { tree: None } + // } fn tree(&self) -> &Tree { // TODO: no unwrap |