-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-ComplexQuite challenging from either a design or technical perspective. Ask for help!Quite challenging from either a design or technical perspective. Ask for help!S-Needs-DesignThis issue requires design work to think about how it would best be accomplishedThis issue requires design work to think about how it would best be accomplished
Description
What problem does this solve or what need does it fill?
Itertools has a great number of fantastic, ergonomic ways to work with iterators, like cartesian product, combinations etc that would be regularly used in games. I would love to be able to use this with my queries, but I can't due to lacking trait impls.
What solution would you like?
impl Clone, IntoIter and any other necessary traits on both Query and QueryIter.
What alternative(s) have you considered?
Write replacements for these methods by hand, either in the engine itself or in each game's code.
Additional context
One of the features of itertools (exactly_one
) was reinvented in #1263 already.
Here's a nice code snippet that I would like to be able to compile showing the building block methods:
use bevy::prelude::*;
struct Foo;
fn my_system(query: Query<&Foo>) {
query.clone();
query.into_iter();
query.iter();
query.iter().clone();
}
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-ComplexQuite challenging from either a design or technical perspective. Ask for help!Quite challenging from either a design or technical perspective. Ask for help!S-Needs-DesignThis issue requires design work to think about how it would best be accomplishedThis issue requires design work to think about how it would best be accomplished