mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-30 22:44:21 +01:00
core: Optimize Cursor::next()
This commit is contained in:
@@ -75,13 +75,12 @@ impl Cursor {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn next(&mut self) -> Result<CursorResult<Option<Record>>> {
|
||||
let result = self.record.take();
|
||||
pub fn next(&mut self) -> Result<CursorResult<()>> {
|
||||
match self.get_next_record()? {
|
||||
CursorResult::Ok((rowid, next)) => {
|
||||
self.rowid.replace(rowid);
|
||||
self.record.replace(next);
|
||||
Ok(CursorResult::Ok(result))
|
||||
Ok(CursorResult::Ok(()))
|
||||
}
|
||||
CursorResult::IO => {
|
||||
return Ok(CursorResult::IO);
|
||||
|
||||
Reference in New Issue
Block a user