Fix up conventions around unsafe in internal functions

This commit is contained in:
Thom Chiovoloni
2020-04-06 19:38:33 -07:00
parent c0df911946
commit 53c99f940e
7 changed files with 46 additions and 46 deletions

View File

@@ -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
}