update the parser with the number of lines already read by the underlying stream (#836)

This commit is contained in:
Mark Thom
2021-02-27 23:56:58 -07:00
parent 064d261357
commit 590a0b8077
3 changed files with 15 additions and 3 deletions

View File

@@ -366,6 +366,11 @@ impl Stream {
ptr as *const u8
}
#[inline]
pub(crate) fn lines_read(&mut self) -> usize {
self.stream_inst.0.borrow_mut().lines_read
}
#[inline]
pub(crate) fn add_lines_read(&mut self, incr_num_lines_read: usize) {
self.stream_inst.0.borrow_mut().lines_read += incr_num_lines_read;