diff options
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r-- | crates/ra_ide_api/src/join_lines.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/join_lines.rs b/crates/ra_ide_api/src/join_lines.rs index a2e4b6f3c..a71e4ed7d 100644 --- a/crates/ra_ide_api/src/join_lines.rs +++ b/crates/ra_ide_api/src/join_lines.rs | |||
@@ -123,7 +123,7 @@ fn has_comma_after(node: &SyntaxNode) -> bool { | |||
123 | fn join_single_expr_block(edit: &mut TextEditBuilder, token: &SyntaxToken) -> Option<()> { | 123 | fn join_single_expr_block(edit: &mut TextEditBuilder, token: &SyntaxToken) -> Option<()> { |
124 | let block = ast::Block::cast(token.parent())?; | 124 | let block = ast::Block::cast(token.parent())?; |
125 | let block_expr = ast::BlockExpr::cast(block.syntax().parent()?)?; | 125 | let block_expr = ast::BlockExpr::cast(block.syntax().parent()?)?; |
126 | let expr = extract_trivial_expression(&block)?; | 126 | let expr = extract_trivial_expression(&block_expr)?; |
127 | 127 | ||
128 | let block_range = block_expr.syntax().text_range(); | 128 | let block_range = block_expr.syntax().text_range(); |
129 | let mut buf = expr.syntax().text().to_string(); | 129 | let mut buf = expr.syntax().text().to_string(); |