Skip to content

Commit

Permalink
Merge #4675
Browse files Browse the repository at this point in the history
4675: Small refactor r=kiljacken a=Veetaha



Co-authored-by: veetaha <[email protected]>
  • Loading branch information
bors[bot] and Veetaha authored May 31, 2020
2 parents e4bdc14 + ddd8116 commit 7ae247f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/ra_syntax/src/syntax_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ impl SyntaxTreeBuilder {

pub fn finish(self) -> Parse<SyntaxNode> {
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) {
Expand Down

0 comments on commit 7ae247f

Please sign in to comment.