Reduce required lifetime

Extends #825 to
 - create_collation
 - commit_hook
 - rollback_hook
 - update_hook
 - table_filter
This commit is contained in:
gwenn
2020-10-28 19:20:05 +01:00
parent 9c954b8cb5
commit 926977846f
4 changed files with 33 additions and 39 deletions

View File

@@ -53,9 +53,9 @@ impl Session<'_> {
}
/// Set a table filter
pub fn table_filter<F>(&mut self, filter: Option<F>)
pub fn table_filter<'s, F>(&'s mut self, filter: Option<F>)
where
F: Fn(&str) -> bool + Send + RefUnwindSafe + 'static,
F: Fn(&str) -> bool + Send + RefUnwindSafe + 's,
{
unsafe extern "C" fn call_boxed_closure<F>(
p_arg: *mut c_void,