diff --git a/core/storage/pager.rs b/core/storage/pager.rs index 285684a72..1123a5079 100644 --- a/core/storage/pager.rs +++ b/core/storage/pager.rs @@ -717,7 +717,7 @@ impl Pager { ); buffer.as_mut_slice()[0..4].copy_from_slice(&page_id.to_be_bytes()); - buffer.as_mut_slice()[4..4 + page_size].copy_from_slice(&contents_buffer); + buffer.as_mut_slice()[4..4 + page_size].copy_from_slice(contents_buffer); Arc::new(buffer) }; @@ -784,7 +784,7 @@ impl Pager { // Same reason as in open_savepoint, the start offset should always be 0 as we should only have max 1 savepoint // opened at any given time. turso_assert!(start_offset == 0, "start offset should be 0"); - let c = subjournal.truncate(start_offset as u64)?; + let c = subjournal.truncate(start_offset)?; assert!(c.succeeded(), "memory IO should complete immediately"); Ok(()) } diff --git a/core/storage/subjournal.rs b/core/storage/subjournal.rs index d174230a5..62a30cf1d 100644 --- a/core/storage/subjournal.rs +++ b/core/storage/subjournal.rs @@ -70,7 +70,7 @@ impl Subjournal { bytes_read == page_size as i32, "bytes_read should be page_size" ); - finish_read_page(page.get().id as usize, buffer, page.clone()); + finish_read_page(page.get().id, buffer, page.clone()); }, ); let c = self.file.pread(offset, c)?; diff --git a/core/vdbe/execute.rs b/core/vdbe/execute.rs index 85eb03ef3..3a56f30bc 100644 --- a/core/vdbe/execute.rs +++ b/core/vdbe/execute.rs @@ -2150,7 +2150,7 @@ pub fn halt( ) -> Result { if err_code > 0 { // Any non-FK constraint violation causes the statement subtransaction to roll back. - state.end_statement(&program.connection, &pager, EndStatement::RollbackSavepoint)?; + state.end_statement(&program.connection, pager, EndStatement::RollbackSavepoint)?; } match err_code { 0 => {} @@ -2187,7 +2187,7 @@ pub fn halt( .load(Ordering::Acquire) > 0 { - state.end_statement(&program.connection, &pager, EndStatement::RollbackSavepoint)?; + state.end_statement(&program.connection, pager, EndStatement::RollbackSavepoint)?; return Err(LimboError::Constraint( "foreign key constraint failed".to_string(), )); @@ -2210,14 +2210,14 @@ pub fn halt( )); } } - state.end_statement(&program.connection, &pager, EndStatement::ReleaseSavepoint)?; + state.end_statement(&program.connection, pager, EndStatement::ReleaseSavepoint)?; program .commit_txn(pager.clone(), state, mv_store, false) .map(Into::into) } else { // Even if deferred violations are present, the statement subtransaction completes successfully when // it is part of an interactive transaction. - state.end_statement(&program.connection, &pager, EndStatement::ReleaseSavepoint)?; + state.end_statement(&program.connection, pager, EndStatement::ReleaseSavepoint)?; Ok(InsnFunctionStepResult::Done) } }