@@ -34,8 +34,8 @@ glib::wrapper! {
3434
3535impl AppInfo {
3636 #[ doc( alias = "g_app_info_create_from_commandline" ) ]
37- pub fn create_from_commandline < P : AsRef < std :: ffi :: OsStr > > (
38- commandline : P ,
37+ pub fn create_from_commandline (
38+ commandline : impl AsRef < std :: ffi :: OsStr > ,
3939 application_name : Option < & str > ,
4040 flags : AppInfoCreateFlags ,
4141 ) -> Result < AppInfo , glib:: Error > {
@@ -113,9 +113,9 @@ impl AppInfo {
113113 }
114114
115115 #[ doc( alias = "g_app_info_launch_default_for_uri" ) ]
116- pub fn launch_default_for_uri < P : IsA < AppLaunchContext > > (
116+ pub fn launch_default_for_uri (
117117 uri : & str ,
118- context : Option < & P > ,
118+ context : Option < & impl IsA < AppLaunchContext > > ,
119119 ) -> Result < ( ) , glib:: Error > {
120120 unsafe {
121121 let mut error = ptr:: null_mut ( ) ;
@@ -135,19 +135,15 @@ impl AppInfo {
135135 #[ cfg( any( feature = "v2_50" , feature = "dox" ) ) ]
136136 #[ cfg_attr( feature = "dox" , doc( cfg( feature = "v2_50" ) ) ) ]
137137 #[ doc( alias = "g_app_info_launch_default_for_uri_async" ) ]
138- pub fn launch_default_for_uri_async <
139- P : IsA < AppLaunchContext > ,
140- Q : IsA < Cancellable > ,
141- R : FnOnce ( Result < ( ) , glib:: Error > ) + Send + ' static ,
142- > (
138+ pub fn launch_default_for_uri_async < P : FnOnce ( Result < ( ) , glib:: Error > ) + Send + ' static > (
143139 uri : & str ,
144- context : Option < & P > ,
145- cancellable : Option < & Q > ,
146- callback : R ,
140+ context : Option < & impl IsA < AppLaunchContext > > ,
141+ cancellable : Option < & impl IsA < Cancellable > > ,
142+ callback : P ,
147143 ) {
148- let user_data: Box_ < R > = Box_ :: new ( callback) ;
144+ let user_data: Box_ < P > = Box_ :: new ( callback) ;
149145 unsafe extern "C" fn launch_default_for_uri_async_trampoline <
150- R : FnOnce ( Result < ( ) , glib:: Error > ) + Send + ' static ,
146+ P : FnOnce ( Result < ( ) , glib:: Error > ) + Send + ' static ,
151147 > (
152148 _source_object : * mut glib:: gobject_ffi:: GObject ,
153149 res : * mut crate :: ffi:: GAsyncResult ,
@@ -160,10 +156,10 @@ impl AppInfo {
160156 } else {
161157 Err ( from_glib_full ( error) )
162158 } ;
163- let callback: Box_ < R > = Box_ :: from_raw ( user_data as * mut _ ) ;
159+ let callback: Box_ < P > = Box_ :: from_raw ( user_data as * mut _ ) ;
164160 callback ( result) ;
165161 }
166- let callback = launch_default_for_uri_async_trampoline :: < R > ;
162+ let callback = launch_default_for_uri_async_trampoline :: < P > ;
167163 unsafe {
168164 ffi:: g_app_info_launch_default_for_uri_async (
169165 uri. to_glib_none ( ) . 0 ,
@@ -177,9 +173,9 @@ impl AppInfo {
177173
178174 #[ cfg( any( feature = "v2_50" , feature = "dox" ) ) ]
179175 #[ cfg_attr( feature = "dox" , doc( cfg( feature = "v2_50" ) ) ) ]
180- pub fn launch_default_for_uri_async_future < P : IsA < AppLaunchContext > + Clone + ' static > (
176+ pub fn launch_default_for_uri_async_future (
181177 uri : & str ,
182- context : Option < & P > ,
178+ context : Option < & ( impl IsA < AppLaunchContext > + Clone + ' static ) > ,
183179 ) -> Pin < Box_ < dyn std:: future:: Future < Output = Result < ( ) , glib:: Error > > + ' static > > {
184180 let uri = String :: from ( uri) ;
185181 let context = context. map ( ToOwned :: to_owned) ;
@@ -225,7 +221,7 @@ pub trait AppInfoExt: 'static {
225221 fn dup ( & self ) -> AppInfo ;
226222
227223 #[ doc( alias = "g_app_info_equal" ) ]
228- fn equal < P : IsA < AppInfo > > ( & self , appinfo2 : & P ) -> bool ;
224+ fn equal ( & self , appinfo2 : & impl IsA < AppInfo > ) -> bool ;
229225
230226 #[ doc( alias = "g_app_info_get_commandline" ) ]
231227 #[ doc( alias = "get_commandline" ) ]
@@ -260,26 +256,26 @@ pub trait AppInfoExt: 'static {
260256 fn supported_types ( & self ) -> Vec < glib:: GString > ;
261257
262258 #[ doc( alias = "g_app_info_launch" ) ]
263- fn launch < P : IsA < AppLaunchContext > > (
259+ fn launch (
264260 & self ,
265261 files : & [ File ] ,
266- context : Option < & P > ,
262+ context : Option < & impl IsA < AppLaunchContext > > ,
267263 ) -> Result < ( ) , glib:: Error > ;
268264
269265 #[ doc( alias = "g_app_info_launch_uris" ) ]
270- fn launch_uris < P : IsA < AppLaunchContext > > (
266+ fn launch_uris (
271267 & self ,
272268 uris : & [ & str ] ,
273- context : Option < & P > ,
269+ context : Option < & impl IsA < AppLaunchContext > > ,
274270 ) -> Result < ( ) , glib:: Error > ;
275271
276272 #[ doc( alias = "g_app_info_remove_supports_type" ) ]
277273 fn remove_supports_type ( & self , content_type : & str ) -> Result < ( ) , glib:: Error > ;
278274
279275 #[ doc( alias = "g_app_info_set_as_default_for_extension" ) ]
280- fn set_as_default_for_extension < P : AsRef < std :: path :: Path > > (
276+ fn set_as_default_for_extension (
281277 & self ,
282- extension : P ,
278+ extension : impl AsRef < std :: path :: Path > ,
283279 ) -> Result < ( ) , glib:: Error > ;
284280
285281 #[ doc( alias = "g_app_info_set_as_default_for_type" ) ]
@@ -335,7 +331,7 @@ impl<O: IsA<AppInfo>> AppInfoExt for O {
335331 unsafe { from_glib_full ( ffi:: g_app_info_dup ( self . as_ref ( ) . to_glib_none ( ) . 0 ) ) }
336332 }
337333
338- fn equal < P : IsA < AppInfo > > ( & self , appinfo2 : & P ) -> bool {
334+ fn equal ( & self , appinfo2 : & impl IsA < AppInfo > ) -> bool {
339335 unsafe {
340336 from_glib ( ffi:: g_app_info_equal (
341337 self . as_ref ( ) . to_glib_none ( ) . 0 ,
@@ -396,10 +392,10 @@ impl<O: IsA<AppInfo>> AppInfoExt for O {
396392 }
397393 }
398394
399- fn launch < P : IsA < AppLaunchContext > > (
395+ fn launch (
400396 & self ,
401397 files : & [ File ] ,
402- context : Option < & P > ,
398+ context : Option < & impl IsA < AppLaunchContext > > ,
403399 ) -> Result < ( ) , glib:: Error > {
404400 unsafe {
405401 let mut error = ptr:: null_mut ( ) ;
@@ -417,10 +413,10 @@ impl<O: IsA<AppInfo>> AppInfoExt for O {
417413 }
418414 }
419415
420- fn launch_uris < P : IsA < AppLaunchContext > > (
416+ fn launch_uris (
421417 & self ,
422418 uris : & [ & str ] ,
423- context : Option < & P > ,
419+ context : Option < & impl IsA < AppLaunchContext > > ,
424420 ) -> Result < ( ) , glib:: Error > {
425421 unsafe {
426422 let mut error = ptr:: null_mut ( ) ;
@@ -454,9 +450,9 @@ impl<O: IsA<AppInfo>> AppInfoExt for O {
454450 }
455451 }
456452
457- fn set_as_default_for_extension < P : AsRef < std :: path :: Path > > (
453+ fn set_as_default_for_extension (
458454 & self ,
459- extension : P ,
455+ extension : impl AsRef < std :: path :: Path > ,
460456 ) -> Result < ( ) , glib:: Error > {
461457 unsafe {
462458 let mut error = ptr:: null_mut ( ) ;
0 commit comments