Mercurial > lbo > hg > leveldb-rs
changeset 438:4ae2a643666d
table_reader: Require a current block to exist for a table iterator to be valid.
author | Lewin Bormann <lbo@spheniscida.de> |
---|---|
date | Sun, 17 Dec 2017 17:59:00 +0100 |
parents | 2901b95ab462 |
children | 7835f1fbb7cf |
files | src/table_reader.rs |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/table_reader.rs Sun Dec 17 17:58:35 2017 +0100 +++ b/src/table_reader.rs Sun Dec 17 17:59:00 2017 +0100 @@ -326,8 +326,7 @@ // This iterator is special in that it's valid even before the first call to advance(). It // behaves correctly, though. fn valid(&self) -> bool { - self.current_block.is_some() && - (self.current_block.as_ref().unwrap().valid() || self.index_block.valid()) + self.current_block.is_some() && (self.current_block.as_ref().unwrap().valid()) } fn current(&self, key: &mut Vec<u8>, val: &mut Vec<u8>) -> bool {