Merge branch 'main' into fuzzing-bugs-6

This commit is contained in:
Sam Mohr 2024-12-30 15:21:31 -05:00 committed by GitHub
commit 0e2f16887a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 1472 additions and 654 deletions

View file

@ -40,6 +40,16 @@ impl<'a, T: Copy> ExtractSpaces<'a> for Spaces<'a, T> {
}
}
impl<'a, T> Spaces<'a, T> {
pub fn item(item: T) -> Self {
Self {
before: &[],
item,
after: &[],
}
}
}
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub struct SpacesBefore<'a, T> {
pub before: &'a [CommentOrNewline<'a>],