diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-06-13 08:18:49 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-06-13 08:18:49 +0100 |
commit | adbee621a75f47e0da4f30d7205dfce009138865 (patch) | |
tree | ed8dcbba37de566f00d119817e141bb8293ce164 /crates/syntax/src/parsing/reparsing.rs | |
parent | f107b0f1e223dba33cb9850ce44bcbb4345eef52 (diff) | |
parent | 5ac6804bb3a07b959e8c2c3534255a8d6bb4948c (diff) |
Merge #9242
9242: Clippy r=matklad a=Maan2003
Best viewed commit wise
Co-authored-by: Maan2003 <[email protected]>
Diffstat (limited to 'crates/syntax/src/parsing/reparsing.rs')
-rw-r--r-- | crates/syntax/src/parsing/reparsing.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/syntax/src/parsing/reparsing.rs b/crates/syntax/src/parsing/reparsing.rs index 304f47b3d..186cc9e74 100644 --- a/crates/syntax/src/parsing/reparsing.rs +++ b/crates/syntax/src/parsing/reparsing.rs | |||
@@ -26,11 +26,11 @@ pub(crate) fn incremental_reparse( | |||
26 | edit: &Indel, | 26 | edit: &Indel, |
27 | errors: Vec<SyntaxError>, | 27 | errors: Vec<SyntaxError>, |
28 | ) -> Option<(GreenNode, Vec<SyntaxError>, TextRange)> { | 28 | ) -> Option<(GreenNode, Vec<SyntaxError>, TextRange)> { |
29 | if let Some((green, new_errors, old_range)) = reparse_token(node, &edit) { | 29 | if let Some((green, new_errors, old_range)) = reparse_token(node, edit) { |
30 | return Some((green, merge_errors(errors, new_errors, old_range, edit), old_range)); | 30 | return Some((green, merge_errors(errors, new_errors, old_range, edit), old_range)); |
31 | } | 31 | } |
32 | 32 | ||
33 | if let Some((green, new_errors, old_range)) = reparse_block(node, &edit) { | 33 | if let Some((green, new_errors, old_range)) = reparse_block(node, edit) { |
34 | return Some((green, merge_errors(errors, new_errors, old_range, edit), old_range)); | 34 | return Some((green, merge_errors(errors, new_errors, old_range, edit), old_range)); |
35 | } | 35 | } |
36 | None | 36 | None |
@@ -52,7 +52,7 @@ fn reparse_token( | |||
52 | } | 52 | } |
53 | } | 53 | } |
54 | 54 | ||
55 | let mut new_text = get_text_after_edit(prev_token.clone().into(), &edit); | 55 | let mut new_text = get_text_after_edit(prev_token.clone().into(), edit); |
56 | let (new_token_kind, new_err) = lex_single_syntax_kind(&new_text)?; | 56 | let (new_token_kind, new_err) = lex_single_syntax_kind(&new_text)?; |
57 | 57 | ||
58 | if new_token_kind != prev_token_kind | 58 | if new_token_kind != prev_token_kind |