diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-05-09 13:40:45 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-05-09 13:40:45 +0100 |
commit | 5af66e54866b2b9942b2a5298a8874ce6a44a1d5 (patch) | |
tree | 9097335ae61afaf895c61ec1532fbf52aeb13aa5 /crates/ra_assists/src/handlers/add_missing_impl_members.rs | |
parent | 25e37e2c93ba91a8956fdff8bbe9701c623d386f (diff) | |
parent | 231fddab5420ffe5edf7b93609ea21155653254a (diff) |
Merge #4387
4387: More fluent indent API r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_assists/src/handlers/add_missing_impl_members.rs')
-rw-r--r-- | crates/ra_assists/src/handlers/add_missing_impl_members.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_assists/src/handlers/add_missing_impl_members.rs b/crates/ra_assists/src/handlers/add_missing_impl_members.rs index 3482a75bf..c1ce87914 100644 --- a/crates/ra_assists/src/handlers/add_missing_impl_members.rs +++ b/crates/ra_assists/src/handlers/add_missing_impl_members.rs | |||
@@ -2,7 +2,7 @@ use hir::HasSource; | |||
2 | use ra_syntax::{ | 2 | use ra_syntax::{ |
3 | ast::{ | 3 | ast::{ |
4 | self, | 4 | self, |
5 | edit::{self, IndentLevel}, | 5 | edit::{self, AstNodeEdit, IndentLevel}, |
6 | make, AstNode, NameOwner, | 6 | make, AstNode, NameOwner, |
7 | }, | 7 | }, |
8 | SmolStr, | 8 | SmolStr, |
@@ -176,8 +176,7 @@ fn add_body(fn_def: ast::FnDef) -> ast::FnDef { | |||
176 | if fn_def.body().is_some() { | 176 | if fn_def.body().is_some() { |
177 | return fn_def; | 177 | return fn_def; |
178 | } | 178 | } |
179 | let body = make::block_expr(None, Some(make::expr_todo())); | 179 | let body = make::block_expr(None, Some(make::expr_todo())).indent(IndentLevel(1)); |
180 | let body = IndentLevel(1).increase_indent(body); | ||
181 | fn_def.with_body(body) | 180 | fn_def.with_body(body) |
182 | } | 181 | } |
183 | 182 | ||