mirror of
https://github.com/isar/rusqlite.git
synced 2025-09-16 04:32:19 +08:00
Avoid relying on sqlite to justify str::from_utf8_unchecked
This commit is contained in:
committed by
Thom Chiovoloni
parent
1b27ce0541
commit
cf9b6e9ae2
@@ -672,7 +672,7 @@ impl Statement<'_> {
|
||||
unsafe {
|
||||
match self.stmt.expanded_sql() {
|
||||
Some(s) => {
|
||||
let sql = str::from_utf8_unchecked(s.to_bytes()).to_owned();
|
||||
let sql = String::from_utf8_lossy(s.to_bytes()).to_string();
|
||||
ffi::sqlite3_free(s.as_ptr() as *mut _);
|
||||
Some(sql)
|
||||
}
|
||||
|
Reference in New Issue
Block a user