fix Queue::last
This commit is contained in:
parent
89495ae3be
commit
2984c3244c
@ -265,7 +265,7 @@ impl<T: FromBytes + FromZeroes + AsBytes + Unaligned + Clone + Copy> FilePointer
|
||||
res
|
||||
}
|
||||
|
||||
pub fn last(self, reader: &impl ReaderTrait, index: u64) -> Option<T> {
|
||||
pub fn last(self, reader: &impl ReaderTrait) -> Option<T> {
|
||||
self.get(reader, self.length(reader) - 1)
|
||||
}
|
||||
|
||||
|
@ -937,6 +937,10 @@ fn queue() {
|
||||
}
|
||||
}
|
||||
|
||||
if !root.is_empty(transaction) {
|
||||
assert_eq!(root.last(transaction), Some(U64::from(i - 1)));
|
||||
}
|
||||
|
||||
root
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user