diff options
author | Aleksey Kladov <[email protected]> | 2019-07-20 14:52:11 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-07-20 14:52:11 +0100 |
commit | f6bcc2d7459a3e10090391a6f9b9a2789e9cab55 (patch) | |
tree | 742f34cb6e1e38f1e009c23405fc2d3c6a232f72 /crates/ra_fmt/src | |
parent | 6b352ffeb346eb7c7e46e00e790c2f395907eaa6 (diff) |
align SyntaxText API with upstream
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() { |