Further relax indentation of implements ability chains

This commit is contained in:
Joshua Warner 2025-01-10 21:10:16 -08:00
parent 7a1b3b8257
commit 0471993428
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
7 changed files with 165 additions and 22 deletions

View file

@ -2024,6 +2024,26 @@ pub trait Spaceable<'a> {
}
}
fn maybe_around_loc(
mut me: Loc<Self>,
arena: &'a Bump,
before: &'a [CommentOrNewline<'a>],
after: &'a [CommentOrNewline<'a>],
) -> Loc<Self>
where
Self: Sized + 'a,
{
if !after.is_empty() {
me.value = arena.alloc(me.value).after(after);
}
if !before.is_empty() {
me.value = arena.alloc(me.value).before(before);
}
me
}
fn with_spaces_before(&'a self, spaces: &'a [CommentOrNewline<'a>], region: Region) -> Loc<Self>
where
Self: Sized,