diff --git a/core/btree.rs b/core/btree.rs index 8b4ef7e6b..7ed1ceda9 100644 --- a/core/btree.rs +++ b/core/btree.rs @@ -75,13 +75,12 @@ impl Cursor { } } - pub fn next(&mut self) -> Result>> { - let result = self.record.take(); + pub fn next(&mut self) -> Result> { 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);