Skip to content

Extend the WorldQuery macro to tuple structs - #8119

Merged
cart merged 12 commits into
bevyengine:mainfrom
joseph-gio:tuple-queries
Apr 4, 2023
Merged

cart merged 12 commits into
bevyengine:mainfrom
joseph-gio:tuple-queries

Conversation

@joseph-gio

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

Copy link
Copy Markdown
Member

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.

Comment thread crates/bevy_ecs/macros/src/fetch.rs Resolved
@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
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 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