refactor: error handling (#41)
This commit is contained in:
@@ -46,11 +46,15 @@ impl StorageIterator for LsmIterator {
|
||||
/// `is_valid` should return false, and `next` should always return an error.
|
||||
pub struct FusedIterator<I: StorageIterator> {
|
||||
iter: I,
|
||||
has_errored: bool,
|
||||
}
|
||||
|
||||
impl<I: StorageIterator> FusedIterator<I> {
|
||||
pub fn new(iter: I) -> Self {
|
||||
Self { iter }
|
||||
Self {
|
||||
iter,
|
||||
has_errored: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user