mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-27 10:17:15 +00:00
Migrate generate_delegate_methods assist to use SyntaxEditor
This commit is contained in:
parent
68e7ec90bf
commit
85f7112c0e
6 changed files with 40 additions and 35 deletions
|
|
@ -229,9 +229,7 @@ pub fn ty_fn_ptr<I: Iterator<Item = Param>>(
|
|||
}
|
||||
}
|
||||
|
||||
pub fn assoc_item_list(
|
||||
body: Option<Vec<either::Either<ast::Attr, ast::AssocItem>>>,
|
||||
) -> ast::AssocItemList {
|
||||
pub fn assoc_item_list(body: Option<Vec<ast::AssocItem>>) -> ast::AssocItemList {
|
||||
let is_break_braces = body.is_some();
|
||||
let body_newline = if is_break_braces { "\n".to_owned() } else { String::new() };
|
||||
let body_indent = if is_break_braces { " ".to_owned() } else { String::new() };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue