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();
}
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: