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

Add methods iter_resources and iter_resources_mut #12829

Merged
merged 8 commits into from
Apr 3, 2024

Conversation

matiqo15
Copy link
Member

@matiqo15 matiqo15 commented Apr 1, 2024

Objective

Solution

  • Create World::iter_resources() and World::iter_resources_mut()

@matiqo15 matiqo15 added C-Feature A new feature, making something new possible A-ECS Entities, components, systems, and events labels Apr 1, 2024
@matiqo15
Copy link
Member Author

matiqo15 commented Apr 1, 2024

@coreh I'd like to get your review on this

@alice-i-cecile
Copy link
Member

Clean and useful. I really want this for bevy_dev_tools, and I think it's a good building block regardless.

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Copy link
Member

@BD103 BD103 left a comment

Choose a reason for hiding this comment

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

Good implementation and documentation 👍

@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 A-Networking Sending data between clients, servers and machines A-Dev-Tools Tools used to debug Bevy applications. M-Needs-Release-Note Work that should be called out in the blog due to impact labels Apr 1, 2024
@alice-i-cecile
Copy link
Member

Waiting a day or two to see if we can get another set of eyes on this :)

Copy link
Contributor

@pablo-lua pablo-lua left a comment

Choose a reason for hiding this comment

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

I'm happy with the state of this and the unsafe parts looks pretty much straightforward, but I think we should probably add safety comments in the docs examples, just so we can show our unsafe parts in examples.
btw, there's a typo too.

crates/bevy_ecs/src/world/mod.rs Show resolved Hide resolved
crates/bevy_ecs/src/world/mod.rs Outdated Show resolved Hide resolved
crates/bevy_ecs/src/world/mod.rs Outdated Show resolved Hide resolved
crates/bevy_ecs/src/world/mod.rs Outdated Show resolved Hide resolved
crates/bevy_ecs/src/world/mod.rs Outdated Show resolved Hide resolved
crates/bevy_ecs/src/world/mod.rs Show resolved Hide resolved
crates/bevy_ecs/src/world/mod.rs Show resolved Hide resolved
@james7132 james7132 removed 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 Apr 2, 2024
matiqo15 and others added 4 commits April 2, 2024 10:19
Co-authored-by: James Liu <contact@jamessliu.com>
Co-authored-by: Pablo Reinhardt <126117294+pablo-lua@users.noreply.github.com>
Co-authored-by: James Liu <contact@jamessliu.com>
@alice-i-cecile alice-i-cecile 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 Apr 2, 2024
@james7132 james7132 added this pull request to the merge queue Apr 3, 2024
Merged via the queue into bevyengine:main with commit 1d4176d Apr 3, 2024
28 checks passed
chompaa pushed a commit to chompaa/bevy that referenced this pull request Apr 5, 2024
# Objective

- Closes bevyengine#12019
- Related to bevyengine#4955
- Useful for dev_tools and networking

## Solution

- Create `World::iter_resources()` and `World::iter_resources_mut()`

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Co-authored-by: James Liu <contact@jamessliu.com>
Co-authored-by: Pablo Reinhardt <126117294+pablo-lua@users.noreply.github.com>
@alice-i-cecile
Copy link
Member

Thank you to everyone involved with the authoring or reviewing of this PR! This work is relatively important and needs release notes! Head over to bevyengine/bevy-website#1296 if you'd like to help out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Dev-Tools Tools used to debug Bevy applications. A-ECS Entities, components, systems, and events A-Networking Sending data between clients, servers and machines C-Feature A new feature, making something new possible 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