(&mut self)
| 355 | |
| 356 | impl<R: Read> BufRead for JsonArrayToNdjsonReader<R> { |
| 357 | fn fill_buf(&mut self) -> std::io::Result<&[u8]> { |
| 358 | if self.output_pos >= self.output_filled { |
| 359 | self.fill_output_buffer()?; |
| 360 | } |
| 361 | Ok(&self.output_buffer[self.output_pos..self.output_filled]) |
| 362 | } |
| 363 | |
| 364 | fn consume(&mut self, amt: usize) { |
| 365 | self.output_pos = std::cmp::min(self.output_pos + amt, self.output_filled); |