From 7ba934fe5866e6aedd8d18e95f8c54e17e18ea51 Mon Sep 17 00:00:00 2001 From: Josh Mcguigan Date: Mon, 23 Mar 2020 19:23:30 -0700 Subject: fill match arms with empty block rather than unit tuple --- crates/ra_syntax/src/ast/make.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'crates/ra_syntax/src/ast') diff --git a/crates/ra_syntax/src/ast/make.rs b/crates/ra_syntax/src/ast/make.rs index 9257ccd1a..1145b69e8 100644 --- a/crates/ra_syntax/src/ast/make.rs +++ b/crates/ra_syntax/src/ast/make.rs @@ -87,6 +87,9 @@ pub fn block_from_expr(e: ast::Expr) -> ast::Block { pub fn expr_unit() -> ast::Expr { expr_from_text("()") } +pub fn expr_empty_block() -> ast::Expr { + expr_from_text("{}") +} pub fn expr_unimplemented() -> ast::Expr { expr_from_text("unimplemented!()") } -- cgit v1.2.3