Skip to content

Commit 1835c4f

Browse files
committed
Remove values_since_snapshot from SnapshotVec
1 parent 85c66da commit 1835c4f

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

src/snapshot_vec.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -182,22 +182,6 @@ impl<D: SnapshotVecDelegate> SnapshotVec<D> {
182182
&self.undo_log[snapshot.length..]
183183
}
184184

185-
pub fn values_since_snapshot(&self, snapshot: &Snapshot) -> Range<usize> {
186-
// `Snapshot` is centred around tracking the length of `undo_log`,
187-
// rather than `values` as we need here, so we need to find the first
188-
// value added since the snapshot in `undo_log`. We can then assume
189-
// the values have been created contiguously up to the current length.
190-
let idx = self.undo_log[snapshot.length..].iter().rev().find_map(|action| {
191-
if let &NewElem(idx) = action {
192-
Some(idx)
193-
} else {
194-
None
195-
}
196-
}).unwrap_or(self.len());
197-
198-
idx..self.len()
199-
}
200-
201185
fn assert_open_snapshot(&self, snapshot: &Snapshot) {
202186
// Failures here may indicate a failure to follow a stack discipline.
203187
assert!(self.undo_log.len() >= snapshot.length);

0 commit comments

Comments
 (0)