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

Implement FromIterator for EntityHashMap #10418

Closed
alice-i-cecile opened this issue Nov 6, 2023 · 1 comment
Closed

Implement FromIterator for EntityHashMap #10418

alice-i-cecile opened this issue Nov 6, 2023 · 1 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

Comments

@alice-i-cecile
Copy link
Member

          > This does change public API. Should a system be implemented to help migrate code?

Breaking changes are generally fine.

Perhaps an impl From<HashMap<K, V, S>> for EntityHashMap<K, V>

I think that we should probably just use the FromIterator trait. Useful idea though, might as well do that here.

Originally posted by @alice-i-cecile in #10415 (comment)

@alice-i-cecile alice-i-cecile 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 labels Nov 6, 2023
@nicopap
Copy link
Contributor

nicopap commented Nov 6, 2023

EntityHashMap is a type alias for HashMap, so whatever HashMap implements, EntityHashMap does. What is needed here is change the API of methods accepting a EntityHashMap.

@alice-i-cecile alice-i-cecile closed this as not planned Won't fix, can't repro, duplicate, stale Nov 6, 2023
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
Projects
None yet
Development

No branches or pull requests

2 participants