Inline Cursor::next_with_spacing.

This commit is contained in:
Nicholas Nethercote 2022-04-20 12:43:25 +10:00
parent b09522a634
commit 5b653c1a43

View File

@ -575,6 +575,7 @@ impl Cursor {
Cursor { stream, index: 0 }
}
#[inline]
pub fn next_with_spacing(&mut self) -> Option<TreeAndSpacing> {
self.stream.0.get(self.index).map(|tree| {
self.index += 1;