(&mut self)
| 512 | } |
| 513 | |
| 514 | fn clear_state(&mut self) { |
| 515 | // `size()` measures Vec capacity rather than len, so allocate new |
| 516 | // buffers instead of using `clear()`. |
| 517 | self.batches = Vec::new(); |
| 518 | self.batch_entries = Vec::new(); |
| 519 | self.num_groups = 0; |
| 520 | } |
| 521 | |
| 522 | fn compact_retained_state(&mut self, emit_groups: usize) -> Result<()> { |
| 523 | // EmitTo::First is used to recover from memory pressure. Simply |