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

use associated type bounds in QueryManyIter and QueryIter::sort() #14107

Merged

Conversation

Victoronz
Copy link
Contributor

@Victoronz Victoronz commented Jul 2, 2024

Objective

The bounds for query iterators are quite intimidating.

Solution

With Rust 1.79, associated type bounds stabilized, which can simplify the bounds slightly.

@Victoronz Victoronz added A-ECS Entities, components, systems, and events C-Code-Quality A section of code that is hard to understand or change D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jul 2, 2024
Copy link
Member

@janhohenheim janhohenheim left a comment

Choose a reason for hiding this comment

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

I personally like moving bounds to the where, but right now things are split between the impl line and the where line, so having at least all bounds consistently on the same line is an improvement in my book :)

@janhohenheim janhohenheim 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 Jul 2, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jul 2, 2024
Merged via the queue into bevyengine:main with commit 7e0d262 Jul 2, 2024
28 checks passed
zmbush pushed a commit to zmbush/bevy that referenced this pull request Jul 3, 2024
…vyengine#14107)

# Objective

The bounds for query iterators are quite intimidating.

## Solution

With Rust 1.79, [associated type
bounds](rust-lang/rust#122055) stabilized,
which can simplify the bounds slightly.
MrGVSV pushed a commit to MrGVSV/bevy that referenced this pull request Jul 5, 2024
…vyengine#14107)

# Objective

The bounds for query iterators are quite intimidating.

## Solution

With Rust 1.79, [associated type
bounds](rust-lang/rust#122055) stabilized,
which can simplify the bounds slightly.
github-merge-queue bot pushed a commit that referenced this pull request Sep 9, 2024
# Objective

Make the bounds for these query methods less intimidating.
Continuation of #14107

<sub>My last pr was back in february 💀
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-Code-Quality A section of code that is hard to understand or change D-Straightforward Simple bug fixes and API improvements, docs, test and examples 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.

3 participants