Skip to content

Commit ddd8116

Browse files
committed
Small refactor
1 parent e4bdc14 commit ddd8116

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/ra_syntax/src/syntax_node.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ impl SyntaxTreeBuilder {
4848

4949
pub fn finish(self) -> Parse<SyntaxNode> {
5050
let (green, errors) = self.finish_raw();
51-
let node = SyntaxNode::new_root(green);
5251
if cfg!(debug_assertions) {
52+
let node = SyntaxNode::new_root(green.clone());
5353
crate::validation::validate_block_structure(&node);
5454
}
55-
Parse::new(node.green().clone(), errors)
55+
Parse::new(green, errors)
5656
}
5757

5858
pub fn token(&mut self, kind: SyntaxKind, text: SmolStr) {

0 commit comments

Comments
 (0)