Apply review suggestions

This commit is contained in:
PThorpe92
2025-07-29 19:38:48 -04:00
parent 73882b97d6
commit ef69df7258
8 changed files with 188 additions and 160 deletions

View File

@@ -724,10 +724,10 @@ impl turso_core::DatabaseStorage for DatabaseFile {
page_size: usize,
buffers: Vec<Arc<RefCell<turso_core::Buffer>>>,
c: turso_core::Completion,
) -> turso_core::Result<()> {
let pos = (page_idx - 1) * page_size;
self.file.pwritev(pos, buffers, c.into())?;
Ok(())
) -> turso_core::Result<turso_core::Completion> {
let pos = page_idx.saturating_sub(1) * page_size;
let c = self.file.pwritev(pos, buffers, c)?;
Ok(c)
}
fn sync(&self, c: turso_core::Completion) -> turso_core::Result<turso_core::Completion> {