Migrate generate_delegate_methods assist to use SyntaxEditor

This commit is contained in:
Hmikihiro 2025-08-02 19:13:07 +09:00
parent 68e7ec90bf
commit 85f7112c0e
6 changed files with 40 additions and 35 deletions

View file

@ -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() };