refactor Completion to have a type field and lift common is_complete property

This commit is contained in:
pedrocarlo
2025-06-24 18:11:01 -03:00
parent e2aafacbb4
commit 64d9193e7b
11 changed files with 90 additions and 72 deletions

View File

@@ -584,8 +584,8 @@ impl DatabaseFile {
impl limbo_core::DatabaseStorage for DatabaseFile {
fn read_page(&self, page_idx: usize, c: Arc<limbo_core::Completion>) -> limbo_core::Result<()> {
let r = match *c {
limbo_core::Completion::Read(ref r) => r,
let r = match c.completion_type {
limbo_core::CompletionType::Read(ref r) => r,
_ => unreachable!(),
};
let size = r.buf().len();