clippy::single_match_else

This commit is contained in:
gwenn
2022-01-05 19:59:54 +01:00
committed by Thom Chiovoloni
parent 68f41d6e9e
commit c10e2f39ef
5 changed files with 55 additions and 68 deletions

View File

@@ -210,8 +210,8 @@ impl<'stmt> FallibleStreamingIterator for Rows<'stmt> {
#[inline]
fn advance(&mut self) -> Result<()> {
match self.stmt {
Some(stmt) => match stmt.step() {
if let Some(stmt) = self.stmt {
match stmt.step() {
Ok(true) => {
self.row = Some(Row { stmt });
Ok(())
@@ -226,11 +226,10 @@ impl<'stmt> FallibleStreamingIterator for Rows<'stmt> {
self.row = None;
Err(e)
}
},
None => {
self.row = None;
Ok(())
}
} else {
self.row = None;
Ok(())
}
}