Provide map() and map_mut() for par_iter_mut() #10215
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
What problem does this solve or what need does it fill?
For when you need to iterate through a query and generate some sort of result from each of the parallel iterators. e.g. reading websockets of sessions and then returning the locally collected requests, flattening it and collecting them all into a single requests list for further processing.
What solution would you like?
I would like
map()
andmap_mut()
(because websocket readers require mutable access). They should be used like so:What alternative(s) have you considered?
The alternative is cumbersome, but doable:
As you can see, not very pretty.
The text was updated successfully, but these errors were encountered: