add_missing_impl_members no longer breaks indentation

This commit is contained in:
ponyii 2023-05-08 22:26:50 +04:00
parent a0db4781dc
commit e07d6382de
3 changed files with 106 additions and 4 deletions

View file

@ -465,6 +465,8 @@ impl ast::Impl {
}
impl ast::AssocItemList {
/// Attention! This function does align the first line of `item` with respect to `self`,
/// but it does _not_ change indentation of other lines (if any).
pub fn add_item(&self, item: ast::AssocItem) {
let (indent, position, whitespace) = match self.assoc_items().last() {
Some(last_item) => (