diff --git a/core/btree.rs b/core/btree.rs index b360cd0aa..a353e81eb 100644 --- a/core/btree.rs +++ b/core/btree.rs @@ -108,7 +108,7 @@ impl BTreeCursor { impl Cursor for BTreeCursor { fn is_empty(&self) -> bool { - self.page.borrow().is_none() + self.record.borrow().is_none() } fn rewind(&mut self) -> Result> { @@ -147,8 +147,4 @@ impl Cursor for BTreeCursor { fn record(&self) -> Result>> { Ok(self.record.borrow()) } - - fn has_record(&self) -> bool { - self.record.borrow().is_some() - } } diff --git a/core/types.rs b/core/types.rs index 6d712037f..b4d55ca62 100644 --- a/core/types.rs +++ b/core/types.rs @@ -87,5 +87,4 @@ pub trait Cursor { fn wait_for_completion(&mut self) -> Result<()>; fn rowid(&self) -> Result>>; fn record(&self) -> Result>>; - fn has_record(&self) -> bool; } diff --git a/core/vdbe.rs b/core/vdbe.rs index 7c85361f6..1d7524059 100644 --- a/core/vdbe.rs +++ b/core/vdbe.rs @@ -288,7 +288,7 @@ impl Program { } => { let cursor = cursors.get_mut(cursor_id).unwrap(); cursor.wait_for_completion()?; - if cursor.has_record() { + if !cursor.is_empty() { state.pc = *pc_if_next; } else { state.pc += 1;