mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-22 16:29:20 +08:00
Use expect() instead of unwrap() for string conversion
This commit is contained in:
parent
835b69fcb7
commit
692b4b67dc
@ -75,7 +75,7 @@ impl Statement<'_> {
|
||||
for i in 0..n {
|
||||
let name = self.column_name(i);
|
||||
let slice = self.stmt.column_decltype(i);
|
||||
let decl_type = slice.map(|s| str::from_utf8(s.to_bytes()).unwrap());
|
||||
let decl_type = slice.map(|s| str::from_utf8(s.to_bytes()).expect("Invalid UTF-8 sequence in column declaration"));
|
||||
cols.push(Column { name, decl_type });
|
||||
}
|
||||
cols
|
||||
|
Loading…
Reference in New Issue
Block a user