Skip to content
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

impl ExclusiveSystemParam for PhantomData #11153

Merged
merged 1 commit into from
Jan 1, 2024

Conversation

stepancheg
Copy link
Contributor

@stepancheg stepancheg commented Dec 30, 2023

Objective

Implement ExclusiveSystemParam for PhantomData.

For the same reason SystemParam impl exists: to simplify writing generic code.

unsafe impl<T: ?Sized> SystemParam for PhantomData<T> {

Also for consistency.

Solution

impl ExclusiveSystemParam for PhantomData.

Changelog

Added: PhantomData now implements ExclusiveSystemParam.

@matiqo15 matiqo15 added A-ECS Entities, components, systems, and events C-Usability A simple quality-of-life change that makes Bevy easier to use labels Dec 30, 2023
Copy link
Member

@JoJoJet JoJoJet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could use a test or two here, but LGTM.

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Dec 31, 2023
@stepancheg
Copy link
Contributor Author

Added a test.

@james7132 james7132 added this pull request to the merge queue Jan 1, 2024
Merged via the queue into bevyengine:main with commit 4fba03b Jan 1, 2024
22 checks passed
@stepancheg stepancheg deleted the esp-phantom-data branch January 1, 2024 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Usability A simple quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants