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

[Merged by Bors] - Add EntityMap::iter() #6935

Closed
wants to merge 1 commit into from

Conversation

Zeenobit
Copy link
Contributor

Objective

There is currently no way to iterate over key/value pairs inside an EntityMap, which makes the usage of this struct very awkward. I couldn't think of a good reason why the iter() function should not be exposed, considering the interface already exposes keys() and values(), so I made this PR.

Solution

Implement iter() for EntityMap in terms of its inner map type.

@james7132 james7132 added 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 labels Dec 13, 2022
@james7132 james7132 added this to the 0.10 milestone Dec 14, 2022
@cart
Copy link
Member

cart commented Dec 16, 2022

bors r+

bors bot pushed a commit that referenced this pull request Dec 16, 2022
# Objective

There is currently no way to iterate over key/value pairs inside an `EntityMap`, which makes the usage of this struct very awkward. I couldn't think of a good reason why the `iter()` function should not be exposed, considering the interface already exposes `keys()` and `values()`, so I made this PR.

## Solution

Implement `iter()` for `EntityMap` in terms of its inner map type.
@bors bors bot changed the title Add EntityMap::iter() [Merged by Bors] - Add EntityMap::iter() Dec 16, 2022
@bors bors bot closed this Dec 16, 2022
@Zeenobit Zeenobit deleted the entity_map_iter branch December 20, 2022 15:34
alradish pushed a commit to alradish/bevy that referenced this pull request Jan 22, 2023
# Objective

There is currently no way to iterate over key/value pairs inside an `EntityMap`, which makes the usage of this struct very awkward. I couldn't think of a good reason why the `iter()` function should not be exposed, considering the interface already exposes `keys()` and `values()`, so I made this PR.

## Solution

Implement `iter()` for `EntityMap` in terms of its inner map type.
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
# Objective

There is currently no way to iterate over key/value pairs inside an `EntityMap`, which makes the usage of this struct very awkward. I couldn't think of a good reason why the `iter()` function should not be exposed, considering the interface already exposes `keys()` and `values()`, so I made this PR.

## Solution

Implement `iter()` for `EntityMap` in terms of its inner map type.
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.

5 participants