Skip to content

Commit 7ae247f

Browse files
bors[bot]Veetaha
andauthored
Merge #4675
4675: Small refactor r=kiljacken a=Veetaha Co-authored-by: veetaha <[email protected]>
2 parents e4bdc14 + ddd8116 commit 7ae247f

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)