diff options
author | Aleksey Kladov <[email protected]> | 2020-05-09 13:40:11 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-05-09 13:40:11 +0100 |
commit | 231fddab5420ffe5edf7b93609ea21155653254a (patch) | |
tree | 9097335ae61afaf895c61ec1532fbf52aeb13aa5 /crates/ra_assists/src/handlers/add_missing_impl_members.rs | |
parent | c6334285e3b8369ca685ca436d94ff1f64201044 (diff) |
More fluent indent API
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 | ||