Skip to content

Commit 4887d3d

Browse files
committed
fixup! SQL: Add metadata count FFI function
Don't call destructor twice
1 parent 3d9f2c3 commit 4887d3d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • opsqueue/src/consumer/dispatcher

‎opsqueue/src/consumer/dispatcher/mod.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,8 @@ impl Dispatcher {
306306
};
307307

308308
if rc != ffi::SQLITE_OK {
309-
unsafe { sqlite_metadata_count_lookup_destructor(user_data) };
309+
// We don't need to explicitly call the destructor.
310+
// c.f. https://sqlite.org/c3ref/create_function.html
310311
return Err(sqlx::Error::Protocol(format!(
311312
"sqlite3_create_function_v2 failed with rc={rc}"
312313
)));

0 commit comments

Comments
 (0)