From d3582a382f6334413b42fb0b8db6f643e5a85b1a Mon Sep 17 00:00:00 2001 From: "Levy A." Date: Tue, 14 Jan 2025 06:49:17 -0300 Subject: [PATCH] fix: small bugs --- core/lib.rs | 2 +- core/vdbe/builder.rs | 2 +- core/vdbe/mod.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/lib.rs b/core/lib.rs index a032dea1e..a851e7281 100644 --- a/core/lib.rs +++ b/core/lib.rs @@ -474,7 +474,7 @@ impl Statement { Ok(Rows::new(stmt)) } - pub fn reset(&self) { + pub fn reset(&mut self) { self.state.reset(); } diff --git a/core/vdbe/builder.rs b/core/vdbe/builder.rs index c796ee5f9..796782640 100644 --- a/core/vdbe/builder.rs +++ b/core/vdbe/builder.rs @@ -54,7 +54,7 @@ impl ProgramBuilder { next_free_register: 1, next_free_label: 0, next_free_cursor_id: 0, - next_free_parameter_index: 1.into(), + next_free_parameter_index: 1.try_into().unwrap(), insns: Vec::new(), next_insn_label: None, cursor_ref: Vec::new(), diff --git a/core/vdbe/mod.rs b/core/vdbe/mod.rs index 80732cf9d..50db5538a 100644 --- a/core/vdbe/mod.rs +++ b/core/vdbe/mod.rs @@ -252,7 +252,7 @@ impl ProgramState { self.parameters.get(usize::from(index) - 1) } - pub fn reset(&self) { + pub fn reset(&mut self) { self.parameters.clear(); } }