-
-
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
EntityRef/Mut get_components (immutable variants only) #15089
Conversation
Co-authored-by: Periwink <[email protected]>
Co-authored-by: Periwink <[email protected]>
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.
Looks good!
It seems like this should have needed a safety comment somewhere explaining how it relies on ReadOnlyQueryData
. Maybe there should be a safety requirement on init_fetch
that the access is consistent, and that is normally discharged by calling update_component_access
and having it not panic? (That shouldn't block this PR, of course.)
Objective
Smaller scoped version of #13375 without the
_mut
variants which currently have unsoundness issues.Solution
Same as #13375, but without the
_mut
variants.Testing
Migration Guide
FilteredEntityRef::components
toFilteredEntityRef::accessed_components
andFilteredEntityMut::components
toFilteredEntityMut::accessed_components
.