Skip to content

Commit

Permalink
Improve printing of ast statments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivorforce committed Apr 28, 2024
1 parent e0a19f9 commit 76f6b72
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/parser/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,7 @@ impl Display for Array {

impl Display for Block {
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error> {
for item in self.statements.iter() {
write!(fmt, "{}\n\n", item)?
};
return Ok(())
write_separated_display(fmt, "\n\n", self.statements.iter())
}
}

Expand Down

0 comments on commit 76f6b72

Please sign in to comment.