aboutsummaryrefslogtreecommitdiff
path: root/crates/syntax
diff options
context:
space:
mode:
authorClemens Wasser <[email protected]>2021-06-03 11:46:56 +0100
committerClemens Wasser <[email protected]>2021-06-03 11:46:56 +0100
commit629e8d1ed0aeabf27a1e1b1d3c8c9134716043e3 (patch)
treec55fdaf665ba247aa5df4f9912290fd5ddd1841a /crates/syntax
parent3c6dc0f89dc9c2902d71e8639b4913917a396f8a (diff)
Apply more clippy suggestions and update generated
Diffstat (limited to 'crates/syntax')
-rw-r--r--crates/syntax/src/parsing/reparsing.rs8
-rw-r--r--crates/syntax/src/tests.rs2
2 files changed, 5 insertions, 5 deletions
diff --git a/crates/syntax/src/parsing/reparsing.rs b/crates/syntax/src/parsing/reparsing.rs
index 4ad50ab72..304f47b3d 100644
--- a/crates/syntax/src/parsing/reparsing.rs
+++ b/crates/syntax/src/parsing/reparsing.rs
@@ -36,8 +36,8 @@ pub(crate) fn incremental_reparse(
36 None 36 None
37} 37}
38 38
39fn reparse_token<'node>( 39fn reparse_token(
40 root: &'node SyntaxNode, 40 root: &SyntaxNode,
41 edit: &Indel, 41 edit: &Indel,
42) -> Option<(GreenNode, Vec<SyntaxError>, TextRange)> { 42) -> Option<(GreenNode, Vec<SyntaxError>, TextRange)> {
43 let prev_token = root.covering_element(edit.delete).as_token()?.clone(); 43 let prev_token = root.covering_element(edit.delete).as_token()?.clone();
@@ -84,8 +84,8 @@ fn reparse_token<'node>(
84 } 84 }
85} 85}
86 86
87fn reparse_block<'node>( 87fn reparse_block(
88 root: &'node SyntaxNode, 88 root: &SyntaxNode,
89 edit: &Indel, 89 edit: &Indel,
90) -> Option<(GreenNode, Vec<SyntaxError>, TextRange)> { 90) -> Option<(GreenNode, Vec<SyntaxError>, TextRange)> {
91 let (node, reparser) = find_reparsable_node(root, edit.delete)?; 91 let (node, reparser) = find_reparsable_node(root, edit.delete)?;
diff --git a/crates/syntax/src/tests.rs b/crates/syntax/src/tests.rs
index 45f3c800f..9f2426171 100644
--- a/crates/syntax/src/tests.rs
+++ b/crates/syntax/src/tests.rs
@@ -236,7 +236,7 @@ where
236 } 236 }
237 }); 237 });
238 dir_tests(&test_data_dir(), err_paths, "rast", |text, path| { 238 dir_tests(&test_data_dir(), err_paths, "rast", |text, path| {
239 if let Ok(_) = f(text) { 239 if f(text).is_ok() {
240 panic!("'{:?}' successfully parsed when it should have errored", path); 240 panic!("'{:?}' successfully parsed when it should have errored", path);
241 } else { 241 } else {
242 "ERROR\n".to_owned() 242 "ERROR\n".to_owned()