bevy/crates
Martin Svanberg 96f0e02728 Implement Clone for Fetches (#2641)
# Objective

This:

```rust
use bevy::prelude::*;

fn main() {
    App::new()
    .add_system(test)
    .run();
}

fn test(entities: Query<Entity>) {
    let mut combinations = entities.iter_combinations_mut();
    while let Some([e1, e2]) = combinations.fetch_next() {    
        dbg!(e1);
    }
}
```

fails with the message "the trait bound `bevy::ecs::query::EntityFetch: std::clone::Clone` is not satisfied". 


## Solution

It works after adding the naive clone implementation to EntityFetch. I'm not super familiar with ECS internals, so I'd appreciate input on this.
2021-08-14 03:14:16 +00:00
..
bevy_app Cleanup FromResources (#2601) 2021-08-13 22:21:34 +00:00
bevy_asset Bump notify to 5.0.0-pre.11 (#2564) 2021-07-29 23:56:16 +00:00
bevy_audio Fix some nightly clippy lints (#2522) 2021-07-29 20:52:15 +00:00
bevy_core Fix some nightly clippy lints (#2522) 2021-07-29 20:52:15 +00:00
bevy_derive Cleanup FromResources (#2601) 2021-08-13 22:21:34 +00:00
bevy_diagnostic Down with the system! (#2496) 2021-07-27 23:42:36 +00:00
bevy_dylib Relicense Bevy under the dual MIT or Apache-2.0 license (#2509) 2021-07-23 21:11:51 +00:00
bevy_dynamic_plugin Merge AppBuilder into App (#2531) 2021-07-27 20:21:06 +00:00
bevy_ecs Implement Clone for Fetches (#2641) 2021-08-14 03:14:16 +00:00
bevy_gilrs Merge AppBuilder into App (#2531) 2021-07-27 20:21:06 +00:00
bevy_gltf Fix some nightly clippy lints (#2522) 2021-07-29 20:52:15 +00:00
bevy_input Down with the system! (#2496) 2021-07-27 23:42:36 +00:00
bevy_internal Link Minimal and Default plugins in the docs. (#2583) 2021-08-10 23:46:39 +00:00
bevy_log Merge AppBuilder into App (#2531) 2021-07-27 20:21:06 +00:00
bevy_macro_utils Relicense Bevy under the dual MIT or Apache-2.0 license (#2509) 2021-07-23 21:11:51 +00:00
bevy_math Relicense Bevy under the dual MIT or Apache-2.0 license (#2509) 2021-07-23 21:11:51 +00:00
bevy_pbr Fix some nightly clippy lints (#2522) 2021-07-29 20:52:15 +00:00
bevy_reflect Fix some nightly clippy lints (#2522) 2021-07-29 20:52:15 +00:00
bevy_render Better error message for unsupported shader features Fixes #869 (#2598) 2021-08-13 22:21:33 +00:00
bevy_scene Fix some nightly clippy lints (#2522) 2021-07-29 20:52:15 +00:00
bevy_sprite Down with the system! (#2496) 2021-07-27 23:42:36 +00:00
bevy_tasks Relicense Bevy under the dual MIT or Apache-2.0 license (#2509) 2021-07-23 21:11:51 +00:00
bevy_text Down with the system! (#2496) 2021-07-27 23:42:36 +00:00
bevy_transform Cleanup FromResources (#2601) 2021-08-13 22:21:34 +00:00
bevy_ui Fix some nightly clippy lints (#2522) 2021-07-29 20:52:15 +00:00
bevy_utils Relicense Bevy under the dual MIT or Apache-2.0 license (#2509) 2021-07-23 21:11:51 +00:00
bevy_wgpu Fix some nightly clippy lints (#2522) 2021-07-29 20:52:15 +00:00
bevy_window Down with the system! (#2496) 2021-07-27 23:42:36 +00:00
bevy_winit Fix some nightly clippy lints (#2522) 2021-07-29 20:52:15 +00:00