diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-05-09 13:49:18 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-05-09 13:49:18 +0100 |
commit | c5c07c2a0a1b4809c5aacef3c8e90034d00c3b03 (patch) | |
tree | fd0c84925abfcfcd853e62b81ea8ab5c9fca8818 /crates/ra_assists | |
parent | 5af66e54866b2b9942b2a5298a8874ce6a44a1d5 (diff) | |
parent | 5c04d8544c647e1f9bbf3c5a2f1e86409d4080f5 (diff) |
Merge #4388
4388: unindent -> dedent r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_assists')
-rw-r--r-- | crates/ra_assists/src/handlers/early_return.rs | 2 |
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) { |