File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -34,12 +34,14 @@ impl DmabufTextureBuilder {
3434 #[ doc( alias = "gdk_dmabuf_texture_builder_build" ) ]
3535 #[ must_use = "The builder must be built to be used" ]
3636 #[ allow( clippy:: missing_safety_doc) ]
37- pub unsafe fn build_with_release_func < F : FnOnce ( ) + ' static > (
37+ pub unsafe fn build_with_release_func < F : FnOnce ( ) + Send + ' static > (
3838 self ,
3939 release_func : F ,
4040 ) -> Result < Texture , glib:: Error > {
4141 let mut error = std:: ptr:: null_mut ( ) ;
42- unsafe extern "C" fn destroy_closure < F : FnOnce ( ) + ' static > ( func : glib:: ffi:: gpointer ) {
42+ unsafe extern "C" fn destroy_closure < F : FnOnce ( ) + Send + ' static > (
43+ func : glib:: ffi:: gpointer ,
44+ ) {
4345 let released_func = Box :: < F > :: from_raw ( func as * mut _ ) ;
4446 released_func ( ) ;
4547 }
Original file line number Diff line number Diff line change @@ -25,8 +25,13 @@ impl GLTextureBuilder {
2525 #[ doc( alias = "gdk_gl_texture_builder_build" ) ]
2626 #[ must_use = "The builder must be built to be used" ]
2727 #[ allow( clippy:: missing_safety_doc) ]
28- pub unsafe fn build_with_release_func < F : FnOnce ( ) + ' static > ( self , release_func : F ) -> Texture {
29- unsafe extern "C" fn destroy_closure < F : FnOnce ( ) + ' static > ( func : glib:: ffi:: gpointer ) {
28+ pub unsafe fn build_with_release_func < F : FnOnce ( ) + Send + ' static > (
29+ self ,
30+ release_func : F ,
31+ ) -> Texture {
32+ unsafe extern "C" fn destroy_closure < F : FnOnce ( ) + Send + ' static > (
33+ func : glib:: ffi:: gpointer ,
34+ ) {
3035 let released_func = Box :: < F > :: from_raw ( func as * mut _ ) ;
3136 released_func ( ) ;
3237 }
You can’t perform that action at this time.
0 commit comments