From bcb2ea912bf96f38505c67a0b6896c6a5ac278ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Kohlgr=C3=BCber?= Date: Wed, 20 Nov 2019 19:01:06 +0100 Subject: fix 2190; add test for "replace if let with match" --- crates/ra_fmt/src/lib.rs | 3 --- 1 file changed, 3 deletions(-) (limited to 'crates/ra_fmt') 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 { pub fn extract_trivial_expression(expr: &ast::BlockExpr) -> Option { let block = expr.block()?; let expr = block.expr()?; - if expr.syntax().text().contains_char('\n') { - return None; - } let non_trivial_children = block.syntax().children().filter(|it| match it.kind() { WHITESPACE | T!['{'] | T!['}'] => false, _ => it != expr.syntax(), -- cgit v1.2.3