@@ -190,7 +190,7 @@ mod bevy_functions {
190190
191191 macro_rules! impl_yarn_fn_tuple_bevy {
192192 ( $( $yarn_param: ident) ,* ) => {
193- #[ allow( non_snake_case) ]
193+ #[ allow( non_snake_case, unused_parens ) ]
194194 impl <' a, Output , $( $yarn_param) ,* > YarnFn <( ( $( $yarn_param, ) * ) , Output ) > for SystemId <In <( $( $yarn_param) ,* ) >, Output >
195195 where
196196 $( $yarn_param: TryFrom <YarnValue > + ' static , ) *
@@ -199,6 +199,7 @@ mod bevy_functions {
199199 type Out = Output ;
200200 #[ allow( non_snake_case) ]
201201 fn call( & self , input: Vec <YarnValue >, world: & mut World ) -> Self :: Out {
202+ #[ allow( unused) ]
202203 let mut input = VecDeque :: from( input) ;
203204 $(
204205 assert!( !input. is_empty( ) , "Passed too few arguments to Function" ) ;
@@ -218,17 +219,17 @@ mod bevy_functions {
218219 impl < ' a , Output > YarnFn < Output > for SystemId < ( ) , Output >
219220 where
220221 Output : IntoYarnValueFromNonYarnValue + ' static ,
221- {
222- type Out = Output ;
223- #[ allow( non_snake_case) ]
224- fn call ( & self , _input : Vec < YarnValue > , world : & mut World ) -> Self :: Out {
225- world. run_system ( * self ) . unwrap ( )
226- }
222+ {
223+ type Out = Output ;
224+ #[ allow( non_snake_case) ]
225+ fn call ( & self , _input : Vec < YarnValue > , world : & mut World ) -> Self :: Out {
226+ world. run_system ( * self ) . unwrap ( )
227+ }
227228
228- fn parameter_types ( & self ) -> Vec < TypeId > {
229- vec ! [ ]
230- }
229+ fn parameter_types ( & self ) -> Vec < TypeId > {
230+ vec ! [ ]
231231 }
232+ }
232233}
233234
234235macro_rules! impl_yarn_fn_tuple {
@@ -373,22 +374,28 @@ mod tests {
373374 #[ test]
374375 fn accepts_system ( ) {
375376 let mut world = World :: default ( ) ;
376- fn f ( _: In < u32 > , _: Query < Entity > ) -> u32 { 0 }
377+ fn f ( _: In < u32 > , _: Query < Entity > ) -> u32 {
378+ 0
379+ }
377380 accept_yarn_fn ( world. register_system ( f) ) ;
378381 }
379382 #[ cfg( feature = "bevy" ) ]
380383 #[ test]
381384 fn accepts_systemparam_only_system ( ) {
382385 let mut world = World :: default ( ) ;
383- fn f ( _: Query < Entity > ) -> u32 { 0 }
386+ fn f ( _: Query < Entity > ) -> u32 {
387+ 0
388+ }
384389 accept_yarn_fn ( world. register_system ( f) ) ;
385390 }
386391
387392 #[ cfg( feature = "bevy" ) ]
388393 #[ test]
389394 fn accepts_degenerate_system ( ) {
390395 let mut world = World :: default ( ) ;
391- fn f ( ) -> u32 { 0 }
396+ fn f ( ) -> u32 {
397+ 0
398+ }
392399 accept_yarn_fn ( world. register_system ( f) ) ;
393400 }
394401
0 commit comments