change all Arc<Completion> to Completion

This commit is contained in:
pedrocarlo
2025-07-28 13:29:42 -03:00
parent 7789c569a0
commit d30c7d54c8
16 changed files with 83 additions and 97 deletions

View File

@@ -694,7 +694,7 @@ impl turso_core::DatabaseStorage for DatabaseFile {
&self,
page_idx: usize,
c: turso_core::Completion,
) -> turso_core::Result<Arc<turso_core::Completion>> {
) -> turso_core::Result<turso_core::Completion> {
let r = c.as_read();
let size = r.buf().len();
assert!(page_idx > 0);
@@ -710,13 +710,13 @@ impl turso_core::DatabaseStorage for DatabaseFile {
page_idx: usize,
buffer: Arc<std::cell::RefCell<turso_core::Buffer>>,
c: turso_core::Completion,
) -> turso_core::Result<Arc<turso_core::Completion>> {
) -> turso_core::Result<turso_core::Completion> {
let size = buffer.borrow().len();
let pos = (page_idx - 1) * size;
self.file.pwrite(pos, buffer, c.into())
}
fn sync(&self, c: turso_core::Completion) -> turso_core::Result<Arc<turso_core::Completion>> {
fn sync(&self, c: turso_core::Completion) -> turso_core::Result<turso_core::Completion> {
self.file.sync(c.into())
}