From 51545f4c2bec500b0a34bb7f7e34b8da747ad1a1 Mon Sep 17 00:00:00 2001 From: Ivan Ukhov Date: Sun, 22 Nov 2015 07:00:09 +0100 Subject: [PATCH] Make a cosmetic adjustment --- src/statement.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/statement.rs b/src/statement.rs index 4b23978..7d3cd31 100644 --- a/src/statement.rs +++ b/src/statement.rs @@ -52,12 +52,11 @@ impl<'l> Statement<'l> { /// The function should be called multiple times until `State::Done` is /// reached in order to evaluate the statement entirely. pub fn next(&mut self) -> Result { - let state = match unsafe { ffi::sqlite3_step(self.raw.0) } { + Ok(match unsafe { ffi::sqlite3_step(self.raw.0) } { ffi::SQLITE_ROW => State::Row, ffi::SQLITE_DONE => State::Done, code => error!(self.raw.1, code), - }; - Ok(state) + }) } /// Read a value from a column.