Render docs for abilities, tuples, and as

This commit is contained in:
Richard Feldman 2023-08-11 20:59:40 -04:00
parent 0fea1ec227
commit 9fe08cafd0
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B
3 changed files with 199 additions and 53 deletions

View file

@ -38,6 +38,13 @@ impl<'a, T> Spaced<'a, T> {
}
}
}
pub fn item(&self) -> &T {
match self {
Spaced::Item(answer) => answer,
Spaced::SpaceBefore(next, _spaces) | Spaced::SpaceAfter(next, _spaces) => next.item(),
}
}
}
impl<'a, T: Debug> Debug for Spaced<'a, T> {