File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ use glib::{prelude::*, translate::*};
5
5
6
6
impl GLTextureBuilder {
7
7
#[ doc( alias = "gdk_gl_texture_builder_build" ) ]
8
- pub unsafe fn build ( & self ) -> Texture {
8
+ #[ must_use = "The builder must be built to be used" ]
9
+ pub unsafe fn build ( self ) -> Texture {
9
10
from_glib_full ( ffi:: gdk_gl_texture_builder_build (
10
11
self . to_glib_none ( ) . 0 ,
11
12
None ,
@@ -14,10 +15,8 @@ impl GLTextureBuilder {
14
15
}
15
16
16
17
#[ doc( alias = "gdk_gl_texture_builder_build" ) ]
17
- pub unsafe fn build_with_release_func < F : FnOnce ( ) + ' static > (
18
- & self ,
19
- release_func : F ,
20
- ) -> Texture {
18
+ #[ must_use = "The builder must be built to be used" ]
19
+ pub unsafe fn build_with_release_func < F : FnOnce ( ) + ' static > ( self , release_func : F ) -> Texture {
21
20
unsafe extern "C" fn destroy_closure < F : FnOnce ( ) + ' static > ( func : glib:: ffi:: gpointer ) {
22
21
let released_func = Box :: < F > :: from_raw ( func as * mut _ ) ;
23
22
released_func ( ) ;
You can’t perform that action at this time.
0 commit comments