File tree 3 files changed +4
-3
lines changed 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -373,13 +373,14 @@ pub fn derive_system_param(input: TokenStream) -> TokenStream {
373
373
374
374
let struct_name = & ast. ident ;
375
375
let fetch_struct_name = Ident :: new ( & format ! ( "{}State" , struct_name) , Span :: call_site ( ) ) ;
376
+ let fetch_struct_visibility = & ast. vis ;
376
377
377
378
TokenStream :: from ( quote ! {
378
379
impl #impl_generics #path:: system:: SystemParam for #struct_name#ty_generics #where_clause {
379
380
type Fetch = #fetch_struct_name <( #( <#field_types as SystemParam >:: Fetch , ) * ) , #punctuated_generic_idents>;
380
381
}
381
382
382
- pub struct #fetch_struct_name<TSystemParamState , #punctuated_generic_idents> {
383
+ #fetch_struct_visibility struct #fetch_struct_name<TSystemParamState , #punctuated_generic_idents> {
383
384
state: TSystemParamState ,
384
385
marker: std:: marker:: PhantomData <( #punctuated_generic_idents) >
385
386
}
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ use std::{
25
25
/// use bevy_ecs::system::SystemParam;
26
26
///
27
27
/// #[derive(SystemParam)]
28
- /// pub struct MyParam<'a> {
28
+ /// struct MyParam<'a> {
29
29
/// foo: Res<'a, usize>,
30
30
/// }
31
31
///
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ pub struct PlayerCount(usize);
17
17
///
18
18
/// In this example, it includes a query and a mutable resource.
19
19
#[ derive( SystemParam ) ]
20
- pub struct PlayerCounter < ' a > {
20
+ struct PlayerCounter < ' a > {
21
21
players : Query < ' a , & ' static Player > ,
22
22
count : ResMut < ' a , PlayerCount > ,
23
23
}
You can’t perform that action at this time.
0 commit comments