Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Extend the WorldQuery macro to tuple structs #8119

Merged
merged 12 commits into from
Apr 4, 2023

Conversation

joseph-gio
Copy link
Member

@joseph-gio joseph-gio commented Mar 18, 2023

Objective

The #[derive(WorldQuery)] macro currently only supports structs with named fields.

Same motivation as #6957. Remove sharp edges from the derive macro, make it just work more often.

Solution

Support tuple structs.


Changelog

  • Added support for tuple structs to the #[derive(WorldQuery)] macro.

@alice-i-cecile alice-i-cecile added A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use labels Mar 18, 2023
@james7132 james7132 self-requested a review March 20, 2023 18:44
@james7132 james7132 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 Mar 31, 2023
@james7132 james7132 added this to the 0.11 milestone Mar 31, 2023
@cart cart added this pull request to the merge queue Apr 4, 2023
Merged via the queue into bevyengine:main with commit b423e6e Apr 4, 2023
@joseph-gio joseph-gio deleted the tuple-queries branch April 4, 2023 01:37
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-ECS Entities, components, systems, and events C-Usability A targeted 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.

4 participants