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:
gwenn
2019-02-21 20:48:09 +01:00
parent 915c10c5bf
commit 6d9ae896b5
14 changed files with 169 additions and 162 deletions

View File

@@ -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();
}