mirror of
https://github.com/isar/rusqlite.git
synced 2025-12-21 19:02:23 +08:00
Merge remote-tracking branch 'jgallagher/master' into vtab
This commit is contained in:
@@ -102,8 +102,7 @@ pub type Result<T> = result::Result<T, Error>;
|
||||
|
||||
unsafe fn errmsg_to_string(errmsg: *const c_char) -> String {
|
||||
let c_slice = CStr::from_ptr(errmsg).to_bytes();
|
||||
let utf8_str = str::from_utf8(c_slice);
|
||||
utf8_str.unwrap_or("Invalid string encoding").to_owned()
|
||||
String::from_utf8_lossy(c_slice).into_owned()
|
||||
}
|
||||
|
||||
fn str_to_cstring(s: &str) -> Result<CString> {
|
||||
|
||||
Reference in New Issue
Block a user