aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src')
-rw-r--r--crates/ra_assists/src/handlers/early_return.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_assists/src/handlers/early_return.rs b/crates/ra_assists/src/handlers/early_return.rs
index 0f2914950..66b296081 100644
--- a/crates/ra_assists/src/handlers/early_return.rs
+++ b/crates/ra_assists/src/handlers/early_return.rs
@@ -156,7 +156,7 @@ pub(crate) fn convert_to_guarded_return(acc: &mut Assists, ctx: &AssistContext)
156 parent_block: &ast::BlockExpr, 156 parent_block: &ast::BlockExpr,
157 if_expr: &ast::IfExpr, 157 if_expr: &ast::IfExpr,
158 ) -> SyntaxNode { 158 ) -> SyntaxNode {
159 let then_block_items = then_block.unindent(IndentLevel::from(1)); 159 let then_block_items = then_block.dedent(IndentLevel::from(1));
160 let end_of_then = then_block_items.syntax().last_child_or_token().unwrap(); 160 let end_of_then = then_block_items.syntax().last_child_or_token().unwrap();
161 let end_of_then = 161 let end_of_then =
162 if end_of_then.prev_sibling_or_token().map(|n| n.kind()) == Some(WHITESPACE) { 162 if end_of_then.prev_sibling_or_token().map(|n| n.kind()) == Some(WHITESPACE) {