If initial offset falls within a commit, adjust it to the commit boundary. Returns `true` if the initial offset is past `commit`. Returns `false` if `self` isn't `Self::Initial`, or the initial offset has been adjusted to the starting offset of `commit`. For iteration, `true` means to skip the commit, `false` to yield it.
(&mut self, commit: &StoredCommit)
| 826 | // |
| 827 | // For iteration, `true` means to skip the commit, `false` to yield it. |
| 828 | fn adjust_initial_offset(&mut self, commit: &StoredCommit) -> bool { |
| 829 | if let Self::Initial { next_offset } = self { |
| 830 | let last_tx_offset = commit.min_tx_offset + commit.n as u64 - 1; |
| 831 | if *next_offset > last_tx_offset { |
| 832 | return true; |
| 833 | } else { |
| 834 | *next_offset = commit.min_tx_offset; |
| 835 | } |
| 836 | } |
| 837 | |
| 838 | false |
| 839 | } |
| 840 | } |
| 841 | |
| 842 | pub struct Commits<R: Repo> { |