Skip to content

Commit

Permalink
refactor(storage): small refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
tcoratger committed Oct 26, 2024
1 parent ab07fcf commit 3350329
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions crates/storage/db-api/src/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,7 @@ where
impl<T: Table, CURSOR: DbCursorRO<T>> Iterator for Walker<'_, T, CURSOR> {
type Item = Result<TableRow<T>, DatabaseError>;
fn next(&mut self) -> Option<Self::Item> {
let start = self.start.take();
if start.is_some() {
return start
}

self.cursor.next().transpose()
self.start.take().or_else(|| self.cursor.next().transpose())
}
}

Expand Down

0 comments on commit 3350329

Please sign in to comment.