From fad63fc9d06d486a944b5b405fafa72cad9c2ff7 Mon Sep 17 00:00:00 2001 From: Ivan Ukhov Date: Fri, 19 Jun 2015 13:10:09 -0400 Subject: [PATCH] Fix the signature of bind --- src/statement.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/statement.rs b/src/statement.rs index 828ab4d..0ea5fe5 100644 --- a/src/statement.rs +++ b/src/statement.rs @@ -24,7 +24,7 @@ pub trait Parameter { /// Bind the parameter at a specific location. /// /// The leftmost location has the index 1. - fn bind(&self, &Statement, usize) -> Result<()>; + fn bind(&self, &mut Statement, usize) -> Result<()>; } /// A value stored in a prepared statement. @@ -78,7 +78,7 @@ impl<'l> Drop for Statement<'l> { impl Parameter for f64 { #[inline] - fn bind(&self, statement: &Statement, i: usize) -> Result<()> { + fn bind(&self, statement: &mut Statement, i: usize) -> Result<()> { debug_assert!(i > 0, "the indexing starts from 1"); unsafe { success!(statement.raw.1, ffi::sqlite3_bind_double(statement.raw.0, i as c_int, @@ -90,7 +90,7 @@ impl Parameter for f64 { impl Parameter for i64 { #[inline] - fn bind(&self, statement: &Statement, i: usize) -> Result<()> { + fn bind(&self, statement: &mut Statement, i: usize) -> Result<()> { debug_assert!(i > 0, "the indexing starts from 1"); unsafe { success!(statement.raw.1, ffi::sqlite3_bind_int64(statement.raw.0, i as c_int, @@ -102,7 +102,7 @@ impl Parameter for i64 { impl<'l> Parameter for &'l str { #[inline] - fn bind(&self, statement: &Statement, i: usize) -> Result<()> { + fn bind(&self, statement: &mut Statement, i: usize) -> Result<()> { debug_assert!(i > 0, "the indexing starts from 1"); unsafe { success!(statement.raw.1, ffi::sqlite3_bind_text(statement.raw.0, i as c_int,