This commit is contained in:
Piotr Osiewicz 2024-01-01 23:56:04 +01:00
parent e2ec96e44a
commit 86facbbe4a
3 changed files with 9 additions and 9 deletions

View file

@ -232,13 +232,13 @@ impl<'a> Statement<'a> {
.last_error()
.with_context(|| format!("Failed to read text length at {index}"))?;
let slice = unsafe { slice::from_raw_parts(pointer as *const u8, len) };
let slice = unsafe { slice::from_raw_parts(pointer, len) };
Ok(str::from_utf8(slice)?)
}
pub fn bind<T: Bind>(&self, value: &T, index: i32) -> Result<i32> {
debug_assert!(index > 0);
Ok(value.bind(self, index)?)
value.bind(self, index)
}
pub fn column<T: Column>(&mut self) -> Result<T> {