From ddd811601e7e65764d372e840f166dfc94f71498 Mon Sep 17 00:00:00 2001 From: veetaha Date: Sun, 31 May 2020 21:39:19 +0300 Subject: Small refactor --- crates/ra_syntax/src/syntax_node.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_syntax') 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 { pub fn finish(self) -> Parse { let (green, errors) = self.finish_raw(); - let node = SyntaxNode::new_root(green); if cfg!(debug_assertions) { + let node = SyntaxNode::new_root(green.clone()); crate::validation::validate_block_structure(&node); } - Parse::new(node.green().clone(), errors) + Parse::new(green, errors) } pub fn token(&mut self, kind: SyntaxKind, text: SmolStr) { -- cgit v1.2.3