Skip to content

Commit

Permalink
Privatize the state field so it cant be modified by accident
Browse files Browse the repository at this point in the history
  • Loading branch information
Aceeri committed Mar 23, 2023
1 parent e258de8 commit cbbb81d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/schedule/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub struct OnUpdate<S: States>(pub S);
///
/// The starting state is defined via the [`Default`] implementation for `S`.
#[derive(Resource, Default, Debug)]
pub struct State<S: States>(pub S);
pub struct State<S: States>(S);

impl<S: States> std::ops::Deref for State<S> {
type Target = S;
Expand Down

0 comments on commit cbbb81d

Please sign in to comment.