Skip to content

Commit

Permalink
apply 0b2243a on mvcc
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Chi <iskyzh@gmail.com>
  • Loading branch information
skyzh committed Feb 11, 2024
1 parent 69eebbd commit 2077c15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mini-lsm-mvcc/src/lsm_iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ impl<I: StorageIterator> StorageIterator for FusedIterator<I> {
}

fn key(&self) -> Self::KeyType<'_> {
if self.has_errored || !self.iter.is_valid() {
if !self.is_valid() {
panic!("invalid access to the underlying iterator");
}
self.iter.key()
}

fn value(&self) -> &[u8] {
if self.has_errored || !self.iter.is_valid() {
if !self.is_valid() {
panic!("invalid access to the underlying iterator");
}
self.iter.value()
Expand Down

0 comments on commit 2077c15

Please sign in to comment.