diff --git a/src/runtime/branch.rs b/src/runtime/branch.rs index 8d35090031d08c0ba205df2726d51cf4d9ad5be0..5aaabef1b7cd41c9348bbae7e1d4d9dc2d821291 100644 --- a/src/runtime/branch.rs +++ b/src/runtime/branch.rs @@ -256,15 +256,6 @@ impl ExecTree { } } - /// Returns an iterator that starts with the provided branch, and then - /// continues to visit all of the branch's parents. - pub fn iter_parents(&self, branch_id: BranchId) -> BranchParentIter { - return BranchParentIter{ - branches: self.branches.as_slice(), - index: branch_id.index as usize, - } - } - // --- Preparing and finishing a speculative round /// Starts a synchronous round by cloning the non-sync branch and marking it @@ -332,26 +323,6 @@ impl IndexMut for ExecTree { } } -/// Iterator over the parents of an `ExecTree` branch. -pub(crate) struct BranchParentIter<'a> { - branches: &'a [Branch], - index: usize, -} - -impl<'a> Iterator for BranchParentIter<'a> { - type Item = &'a Branch; - - fn next(&mut self) -> Option { - if self.index == 0 { - return None; - } - - let branch = &self.branches[self.index]; - self.index = branch.parent_id.index as usize; - return Some(branch); - } -} - // ----------------------------------------------------------------------------- // FakeTree // -----------------------------------------------------------------------------