(&self, force: bool)
| 289 | } |
| 290 | |
| 291 | fn flush_internal(&self, force: bool) { |
| 292 | let should_flush = force || self.elapsed_since_last_flush() >= self.flush_interval; |
| 293 | if !should_flush { |
| 294 | return; |
| 295 | } |
| 296 | |
| 297 | let batch = self.drain_batch(); |
| 298 | if batch.is_empty() { |
| 299 | return; |
| 300 | } |
| 301 | |
| 302 | (self.on_flush)(batch); |
| 303 | self.mark_flushed(); |
| 304 | } |
| 305 | } |
| 306 | |
| 307 | impl FileSearchProgressSink for BatchedFileSearchProgressSink { |
no test coverage detected