code indent

This commit is contained in:
king6cong 2017-06-01 17:31:41 +08:00
parent d5bd7d9601
commit 13a32e4004
2 changed files with 16 additions and 16 deletions

View File

@ -918,7 +918,7 @@ mod test {
CREATE TABLE foo(x INTEGER); CREATE TABLE foo(x INTEGER);
INSERT INTO foo VALUES(42); INSERT INTO foo VALUES(42);
END;"; END;";
db.execute_batch(sql).unwrap(); db.execute_batch(sql).unwrap();
} }
let path_string = path.to_str().unwrap(); let path_string = path.to_str().unwrap();

View File

@ -30,21 +30,21 @@ impl<'stmt> Rows<'stmt> {
pub fn next<'a>(&'a mut self) -> Option<Result<Row<'a, 'stmt>>> { pub fn next<'a>(&'a mut self) -> Option<Result<Row<'a, 'stmt>>> {
self.stmt self.stmt
.and_then(|stmt| match stmt.step() { .and_then(|stmt| match stmt.step() {
Ok(true) => { Ok(true) => {
Some(Ok(Row { Some(Ok(Row {
stmt: stmt, stmt: stmt,
phantom: PhantomData, phantom: PhantomData,
})) }))
} }
Ok(false) => { Ok(false) => {
self.reset(); self.reset();
None None
} }
Err(err) => { Err(err) => {
self.reset(); self.reset();
Some(Err(err)) Some(Err(err))
} }
}) })
} }
} }