Fix clippy warnings

This commit is contained in:
gwenn
2022-07-31 07:00:37 +02:00
parent 12fc73d122
commit d5110ced91
11 changed files with 59 additions and 64 deletions

View File

@@ -391,7 +391,7 @@ impl RowIndex for usize {
impl RowIndex for &'_ str {
#[inline]
fn idx(&self, stmt: &Statement<'_>) -> Result<usize> {
stmt.column_index(*self)
stmt.column_index(self)
}
}
@@ -448,7 +448,7 @@ mod tests {
let val = conn.query_row("SELECT a FROM test", [], |row| <(u32,)>::try_from(row))?;
assert_eq!(val, (42,));
let fail = conn.query_row("SELECT a FROM test", [], |row| <(u32, u32)>::try_from(row));
assert!(fail.is_err());
fail.unwrap_err();
Ok(())
}
@@ -466,7 +466,7 @@ mod tests {
let fail = conn.query_row("SELECT a, b FROM test", [], |row| {
<(u32, u32, u32)>::try_from(row)
});
assert!(fail.is_err());
fail.unwrap_err();
Ok(())
}