-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make 8 methods public and updated input parameter generics for SystemState::build_system_with_input #17034
Make 8 methods public and updated input parameter generics for SystemState::build_system_with_input #17034
Conversation
@@ -396,7 +396,7 @@ macro_rules! impl_build_system { | |||
Input: SystemInput, | |||
Out: 'static, | |||
Marker, | |||
F: FnMut(In<Input>, $(SystemParamItem<$param>),*) -> Out | |||
F: FnMut(Input, $(SystemParamItem<$param>),*) -> Out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After #15184, the input parameter no longer have to be wrapped in a In
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. Can we remove In
completely in a follow-up then?
/// Safety: Modifying the system param states may have unintented consequences. | ||
/// the param state is generally considered to be owned by the [`SystemParam`]. Modifications | ||
/// should respect any invariants as required by the [`SystemParam`]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be helpful to provide an example of when this might be the case, as I'm not sure why it needs to be unsafe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, modifying the system state of ResMut
without also updating [SystemMeta::component_access_set
] will obviously create issues.
Objective