diff --git a/bridgetree/src/lib.rs b/bridgetree/src/lib.rs index 3b39bc3..cc2ee22 100644 --- a/bridgetree/src/lib.rs +++ b/bridgetree/src/lib.rs @@ -980,7 +980,6 @@ impl BridgeTree { pub fn mark(&mut self) -> Option { match self.current_bridge.take() { Some(mut cur_b) => { - cur_b.track_current_leaf(); let pos = cur_b.position(); // If the latest bridge is a newly created checkpoint, the last prior // bridge will have the same position and all we need to do is mark @@ -992,8 +991,10 @@ impl BridgeTree { { // the current bridge has not been advanced, so we just need to make // sure that we have are tracking the marked leaf + cur_b.track_current_leaf(); self.current_bridge = Some(cur_b); } else { + // the successor(true) call will ensure that the marked leaf is tracked let successor = cur_b.successor(true); self.prior_bridges.push(cur_b); self.current_bridge = Some(successor);