removing unwraps

This commit is contained in:
Jeroen Vannevel 2022-01-22 10:54:37 +00:00
parent 50c913c733
commit 4896ffb65c
3 changed files with 30 additions and 34 deletions

View file

@ -335,14 +335,15 @@ pub fn block_expr_full(
) -> ast::BlockExpr {
let mut buf = "{\n".to_string();
for stmt in stmts.into_iter() {
match stmt {
rowan::NodeOrToken::Node(n) => {
println!("Node: {:?}", n.text());
format_to!(buf, " {}\n", n)
},
rowan::NodeOrToken::Token(t) if t.kind() == SyntaxKind::COMMENT => format_to!(buf, " {}\n", t),
_ => ()
}
rowan::NodeOrToken::Token(t) if t.kind() == SyntaxKind::COMMENT => {
format_to!(buf, " {}\n", t)
}
_ => (),
}
}
if let Some(tail_expr) = tail_expr {