aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_fmt/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_fmt/src/lib.rs')
-rw-r--r--crates/ra_fmt/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_fmt/src/lib.rs b/crates/ra_fmt/src/lib.rs
index db27f9b83..0b4ba1bbe 100644
--- a/crates/ra_fmt/src/lib.rs
+++ b/crates/ra_fmt/src/lib.rs
@@ -60,10 +60,10 @@ pub fn extract_trivial_expression(block: &ast::BlockExpr) -> Option<ast::Expr> {
60 } else { 60 } else {
61 // Unwrap `{ continue; }` 61 // Unwrap `{ continue; }`
62 let (stmt,) = block.statements().next_tuple()?; 62 let (stmt,) = block.statements().next_tuple()?;
63 if has_anything_else(stmt.syntax()) {
64 return None;
65 }
66 if let ast::Stmt::ExprStmt(expr_stmt) = stmt { 63 if let ast::Stmt::ExprStmt(expr_stmt) = stmt {
64 if has_anything_else(expr_stmt.syntax()) {
65 return None;
66 }
67 let expr = expr_stmt.expr()?; 67 let expr = expr_stmt.expr()?;
68 match expr.syntax().kind() { 68 match expr.syntax().kind() {
69 CONTINUE_EXPR | BREAK_EXPR | RETURN_EXPR => return Some(expr), 69 CONTINUE_EXPR | BREAK_EXPR | RETURN_EXPR => return Some(expr),