mirror of
https://github.com/isar/rusqlite.git
synced 2025-08-26 00:04:32 +08:00
Do not panic by default
Replace `Row::get` by `Row::get_checked`, And rename original `Row::get` to `Row::get_unwrap`. `Stmt::query_map`, `Stmt::query_map_named`, `Stmt::query_row`, `Conn::query_row` and `Conn::query_row_named` callback parameter must return a `Result`.
This commit is contained in:
@@ -389,7 +389,7 @@ mod test {
|
||||
|
||||
let mut rows = s.query(NO_PARAMS).unwrap();
|
||||
let row = rows.next().unwrap().unwrap();
|
||||
assert_eq!(row.get::<_, i32>(0), 2);
|
||||
assert_eq!(row.get_unwrap::<_, i32>(0), 2);
|
||||
}
|
||||
db.execute_batch("DROP TABLE vtab").unwrap();
|
||||
}
|
||||
|
Reference in New Issue
Block a user