Skip to content

simple Debug impls for query iterators#13476

Merged
alice-i-cecile merged 1 commit intobevyengine:mainfrom
Victoronz:query-iter-debug-impls
May 22, 2024
Merged

simple Debug impls for query iterators#13476
alice-i-cecile merged 1 commit intobevyengine:mainfrom
Victoronz:query-iter-debug-impls

Conversation

@Victoronz
Copy link
Copy Markdown
Contributor

@Victoronz Victoronz commented May 22, 2024

Objective

The current query iterators cannot be used in positions with a Debug bound.
F.e. when they are packaged in Result in the error position, expect cannot be called on them.
Required for QueryManyIter::entities_all_unique in #13477.

Solution

Add simple Debug impls that print the query iterator names.

Changelog

QueryIter, QueryManyIter, QueryCombinationIter, and QuerySortedIter now implement Debug.

@Victoronz Victoronz added D-Trivial Nice and easy! A great choice to get started with Bevy A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels May 22, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue May 22, 2024
github-merge-queue bot pushed a commit that referenced this pull request May 22, 2024
# Objective

The current query iterators cannot be used in positions with a `Debug`
bound.
F.e. when they are packaged in `Result` in the error position, `expect`
cannot be called on them.
Required for `QueryManyIter::entities_all_unique`

## Solution

Add simple `Debug` impls that print the query iterator names.

## Changelog

`QueryIter`, `QueryManyIter`, `QueryCombinationIter`, and
`QuerySortedIter` now implement `Debug`.
@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels May 22, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 22, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue May 22, 2024
Merged via the queue into bevyengine:main with commit c4cedb1 May 22, 2024
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 D-Trivial Nice and easy! A great choice to get started with Bevy 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.

2 participants