Signed-off-by: Alex Chi <iskyzh@gmail.com>
This commit is contained in:
Alex Chi
2024-02-11 10:40:06 -05:00
parent 69eebbd848
commit 2077c15e82

View File

@@ -136,14 +136,14 @@ impl<I: StorageIterator> StorageIterator for FusedIterator<I> {
} }
fn key(&self) -> Self::KeyType<'_> { fn key(&self) -> Self::KeyType<'_> {
if self.has_errored || !self.iter.is_valid() { if !self.is_valid() {
panic!("invalid access to the underlying iterator"); panic!("invalid access to the underlying iterator");
} }
self.iter.key() self.iter.key()
} }
fn value(&self) -> &[u8] { fn value(&self) -> &[u8] {
if self.has_errored || !self.iter.is_valid() { if !self.is_valid() {
panic!("invalid access to the underlying iterator"); panic!("invalid access to the underlying iterator");
} }
self.iter.value() self.iter.value()