diff options
Diffstat (limited to 'crates/ra_fmt/src')
-rw-r--r-- | crates/ra_fmt/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_fmt/src/lib.rs b/crates/ra_fmt/src/lib.rs index d6e895729..b09478d7a 100644 --- a/crates/ra_fmt/src/lib.rs +++ b/crates/ra_fmt/src/lib.rs | |||
@@ -36,7 +36,7 @@ fn prev_tokens(token: SyntaxToken) -> impl Iterator<Item = SyntaxToken> { | |||
36 | 36 | ||
37 | pub fn extract_trivial_expression(block: &ast::Block) -> Option<ast::Expr> { | 37 | pub fn extract_trivial_expression(block: &ast::Block) -> Option<ast::Expr> { |
38 | let expr = block.expr()?; | 38 | let expr = block.expr()?; |
39 | if expr.syntax().text().contains('\n') { | 39 | if expr.syntax().text().contains_char('\n') { |
40 | return None; | 40 | return None; |
41 | } | 41 | } |
42 | let non_trivial_children = block.syntax().children().filter(|it| match it.kind() { | 42 | let non_trivial_children = block.syntax().children().filter(|it| match it.kind() { |