diff --git a/Changelog.md b/Changelog.md index 36b0f3e..6c401f0 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,6 @@ # Version UPCOMING (...) +* Fixes crash on nightly Rust when using the `trace` feature. * Adds optional `clippy` feature and addresses issues it found. * Adds `column_count()` method to `Statement` and `Row`. * Adds `types::Value` for dynamic column types. diff --git a/src/trace.rs b/src/trace.rs index bd3b537..a36aa33 100644 --- a/src/trace.rs +++ b/src/trace.rs @@ -35,7 +35,9 @@ pub unsafe fn config_log(callback: Option) -> Result<()> { let rc = match callback { Some(f) => { let p_arg: *mut c_void = mem::transmute(f); - ffi::sqlite3_config(ffi::SQLITE_CONFIG_LOG, Some(log_callback), p_arg) + ffi::sqlite3_config(ffi::SQLITE_CONFIG_LOG, + log_callback as extern "C" fn(_, _, _), + p_arg) } None => { let nullptr: *mut c_void = ptr::null_mut();