mirror of
https://github.com/isar/rusqlite.git
synced 2025-09-16 12:42:18 +08:00
Fix up conventions around unsafe in internal functions
This commit is contained in:
@@ -619,7 +619,7 @@ impl Statement<'_> {
|
||||
}
|
||||
|
||||
fn finalize_(&mut self) -> Result<()> {
|
||||
let mut stmt = RawStatement::new(ptr::null_mut(), false);
|
||||
let mut stmt = unsafe { RawStatement::new(ptr::null_mut(), false) };
|
||||
mem::swap(&mut stmt, &mut self.stmt);
|
||||
self.conn.decode_result(stmt.finalize())
|
||||
}
|
||||
@@ -710,7 +710,7 @@ impl Statement<'_> {
|
||||
|
||||
impl Into<RawStatement> for Statement<'_> {
|
||||
fn into(mut self) -> RawStatement {
|
||||
let mut stmt = RawStatement::new(ptr::null_mut(), false);
|
||||
let mut stmt = unsafe { RawStatement::new(ptr::null_mut(), false) };
|
||||
mem::swap(&mut stmt, &mut self.stmt);
|
||||
stmt
|
||||
}
|
||||
|
Reference in New Issue
Block a user