Bevy version
bevy_ecs 0.5.0
Operating system & version
Windows 10, GCC
What you did
{
// SpaceShip is a component, sector.space() is a &mut World
(|(mut commands, query) : (Commands, Query<(Entity, With<SpaceShip>)>)|
{
for entity in query.iter() {
commands.entity(entity).despawn();
}
}).system().run((), &mut sector.space())
}
What you expected to happen
All queries which involve states (With, Without, Changed) should be read-only.
What actually happened
Did not compile
--> sg_simulation\src\network\sync\test_sector.rs:704:37
|
704 | for entity in query.iter() {
| ^^^^ the trait ReadOnlyFetch is not implemented for WithFetch<&ship_component::SpaceShip>
|
= note: required because of the requirements on the impl of ReadOnlyFetch for (EntityFetch, WithFetch<&ship_component::SpaceShip>)
Additional information
Non-critical, I can use iter_mut. With #2305 I would not have noticed this issue at all.
Is perhaps similar to #763
Does this bug mean that I can't run two queries using With<SpaceShip> at the same time?
Bevy version
bevy_ecs 0.5.0
Operating system & version
Windows 10, GCC
What you did
What you expected to happen
All queries which involve states (With, Without, Changed) should be read-only.
What actually happened
Did not compile
--> sg_simulation\src\network\sync\test_sector.rs:704:37
|
704 | for entity in query.iter() {
| ^^^^ the trait
ReadOnlyFetchis not implemented forWithFetch<&ship_component::SpaceShip>|
= note: required because of the requirements on the impl of
ReadOnlyFetchfor(EntityFetch, WithFetch<&ship_component::SpaceShip>)Additional information
Non-critical, I can use
iter_mut. With #2305 I would not have noticed this issue at all.Is perhaps similar to #763
Does this bug mean that I can't run two queries using
With<SpaceShip>at the same time?