mirror of
https://github.com/isar/rusqlite.git
synced 2025-10-25 02:18:55 +08:00
Rework ToSql to be implementable without unsafe.
This commit is contained in:
@@ -182,7 +182,7 @@ impl<'a> ValueRef<'a> {
|
||||
|
||||
ValueRef::Blob(from_raw_parts(blob as *const u8, len as usize))
|
||||
}
|
||||
_ => unreachable!("sqlite3_value_type returned invalid value")
|
||||
_ => unreachable!("sqlite3_value_type returned invalid value"),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -219,7 +219,7 @@ impl<'a> Context<'a> {
|
||||
let value = unsafe { ValueRef::from_value(arg) };
|
||||
FromSql::column_result(value).map_err(|err| match err {
|
||||
Error::InvalidColumnType => Error::InvalidFunctionParameterType,
|
||||
_ => err
|
||||
_ => err,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user