mirror of
https://github.com/fluencelabs/sqlite-wasm-connector
synced 2025-04-10 10:16:04 +00:00
Make use of Option::take instead of mem::replace
This commit is contained in:
parent
0390d179d5
commit
06b54cecb0
@ -93,7 +93,7 @@ impl<'l> Connection<'l> {
|
|||||||
/// Remove the callback handling busy events.
|
/// Remove the callback handling busy events.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn remove_busy_handler(&mut self) -> Result<()> {
|
pub fn remove_busy_handler(&mut self) -> Result<()> {
|
||||||
::std::mem::replace(&mut self.busy_callback, None);
|
self.busy_callback.take();
|
||||||
unsafe { ok!(self.raw, ffi::sqlite3_busy_handler(self.raw, None, 0 as *mut _)) };
|
unsafe { ok!(self.raw, ffi::sqlite3_busy_handler(self.raw, None, 0 as *mut _)) };
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user