add get_snapshot
This commit is contained in:
parent
38bb53f98c
commit
1383d615de
@ -446,6 +446,10 @@ impl<R> Db<R> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_snapshot(&self) -> Arc<Snapshot<R>> {
|
||||
self.state.get()
|
||||
}
|
||||
|
||||
fn update_root(&mut self, new_root: FilePointer<R>) -> Arc<Snapshot<R>> {
|
||||
// TODO: we could write some here + flush here for better consistency
|
||||
// e.g. a copy of the new root pointer
|
||||
|
@ -931,7 +931,6 @@ fn queue() {
|
||||
|
||||
let elements = root.get_range(transaction, s..e).unwrap();
|
||||
|
||||
dbg!(&elements);
|
||||
for (i, element) in elements.into_iter().enumerate() {
|
||||
assert_eq!(element.get(), j + s + i as u64);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user