aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorveetaha <[email protected]>2020-05-31 19:39:19 +0100
committerveetaha <[email protected]>2020-05-31 19:39:19 +0100
commitddd811601e7e65764d372e840f166dfc94f71498 (patch)
tree698f5c436c77dd80ddd46a563d5ec660015158e8 /crates
parente4bdc1495142a7497a92388570defd519c22dcb1 (diff)
Small refactor
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_syntax/src/syntax_node.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/syntax_node.rs b/crates/ra_syntax/src/syntax_node.rs
index e566af7e8..9650b8781 100644
--- a/crates/ra_syntax/src/syntax_node.rs
+++ b/crates/ra_syntax/src/syntax_node.rs
@@ -48,11 +48,11 @@ impl SyntaxTreeBuilder {
48 48
49 pub fn finish(self) -> Parse<SyntaxNode> { 49 pub fn finish(self) -> Parse<SyntaxNode> {
50 let (green, errors) = self.finish_raw(); 50 let (green, errors) = self.finish_raw();
51 let node = SyntaxNode::new_root(green);
52 if cfg!(debug_assertions) { 51 if cfg!(debug_assertions) {
52 let node = SyntaxNode::new_root(green.clone());
53 crate::validation::validate_block_structure(&node); 53 crate::validation::validate_block_structure(&node);
54 } 54 }
55 Parse::new(node.green().clone(), errors) 55 Parse::new(green, errors)
56 } 56 }
57 57
58 pub fn token(&mut self, kind: SyntaxKind, text: SmolStr) { 58 pub fn token(&mut self, kind: SyntaxKind, text: SmolStr) {