Fix clippy warnings

This commit is contained in:
gwenn
2021-10-01 20:09:48 +02:00
parent e2af87f747
commit ce90b519bb
6 changed files with 22 additions and 23 deletions

View File

@@ -679,7 +679,7 @@ impl Connection {
stmt.check_no_tail()?;
let mut rows = stmt.query(params)?;
rows.get_expected_row().map_err(E::from).and_then(|r| f(r))
rows.get_expected_row().map_err(E::from).and_then(f)
}
/// Prepare a SQL statement for execution.
@@ -1346,9 +1346,11 @@ mod test {
fn test_execute_select() {
let db = checked_memory_handle();
let err = db.execute("SELECT 1 WHERE 1 < ?", [1i32]).unwrap_err();
if err != Error::ExecuteReturnedResults {
panic!("Unexpected error: {}", err);
}
assert!(
err == Error::ExecuteReturnedResults,
"Unexpected error: {}",
err
);
}
#[test]