(&mut self)
| 353 | } |
| 354 | |
| 355 | pub(super) fn collect_committed_entries(&mut self) { |
| 356 | let from = self.volatile.last_applied + 1; |
| 357 | let to = self.volatile.commit_index; |
| 358 | if from > to { |
| 359 | return; |
| 360 | } |
| 361 | if let Ok(entries) = self.log.entries_range(from, to) { |
| 362 | self.ready.committed_entries.extend(entries.iter().cloned()); |
| 363 | } |
| 364 | } |
| 365 | |
| 366 | pub(super) fn persist_hard_state(&mut self) { |
| 367 | self.ready.hard_state = Some(self.hard_state.clone()); |
no test coverage detected