From 1c4ca000cf909df58b94e06fef92e15d90b13acc Mon Sep 17 00:00:00 2001 From: Gwenael Treguier Date: Sun, 13 Dec 2015 14:15:56 +0100 Subject: [PATCH] Simplify execute_batch implementation. --- src/lib.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 67fc19f..72025c9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -658,13 +658,12 @@ impl InnerConnection { fn execute_batch(&mut self, sql: &str) -> Result<()> { let c_sql = try!(str_to_cstring(sql)); unsafe { - let mut errmsg: *mut c_char = mem::uninitialized(); let r = ffi::sqlite3_exec(self.db(), c_sql.as_ptr(), None, ptr::null_mut(), - &mut errmsg); - self.decode_result_with_errmsg(r, errmsg) + ptr::null_mut()); + self.decode_result(r) } }