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(); } }