diff --git a/src/datastructures/queue.rs b/src/datastructures/queue.rs index 09711f4..443a016 100644 --- a/src/datastructures/queue.rs +++ b/src/datastructures/queue.rs @@ -265,7 +265,7 @@ impl FilePointer res } - pub fn last(self, reader: &impl ReaderTrait, index: u64) -> Option { + pub fn last(self, reader: &impl ReaderTrait) -> Option { self.get(reader, self.length(reader) - 1) } diff --git a/src/tests.rs b/src/tests.rs index f8c246e..e3515eb 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -937,6 +937,10 @@ fn queue() { } } + if !root.is_empty(transaction) { + assert_eq!(root.last(transaction), Some(U64::from(i - 1))); + } + root });