aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_fmt
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_fmt')
-rw-r--r--crates/ra_fmt/src/lib.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/crates/ra_fmt/src/lib.rs b/crates/ra_fmt/src/lib.rs
index a30ed4cbb..10f592257 100644
--- a/crates/ra_fmt/src/lib.rs
+++ b/crates/ra_fmt/src/lib.rs
@@ -38,9 +38,6 @@ fn prev_tokens(token: SyntaxToken) -> impl Iterator<Item = SyntaxToken> {
38pub fn extract_trivial_expression(expr: &ast::BlockExpr) -> Option<ast::Expr> { 38pub fn extract_trivial_expression(expr: &ast::BlockExpr) -> Option<ast::Expr> {
39 let block = expr.block()?; 39 let block = expr.block()?;
40 let expr = block.expr()?; 40 let expr = block.expr()?;
41 if expr.syntax().text().contains_char('\n') {
42 return None;
43 }
44 let non_trivial_children = block.syntax().children().filter(|it| match it.kind() { 41 let non_trivial_children = block.syntax().children().filter(|it| match it.kind() {
45 WHITESPACE | T!['{'] | T!['}'] => false, 42 WHITESPACE | T!['{'] | T!['}'] => false,
46 _ => it != expr.syntax(), 43 _ => it != expr.syntax(),