Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

impl ReadOnlyFetch for Or, FetchOr, and FetchMutated #763

Merged
merged 1 commit into from
Nov 2, 2020

Conversation

memoryruins
Copy link
Contributor

@memoryruins memoryruins commented Nov 1, 2020

ReadOnlyFetch is now implemented on Or and FetchOr.
An impl for FetchMutated has been added for parity with FetchChanged and FetchAdded.

// previously would error due to missing implementations
let entities = world
    .query::<(Or<(Mutated<A>, Changed<B>, Added<C>)>, Entity)>()
    .map(|((_a, _b, _c), e)| e)
    .collect::<Vec<Entity>>();

If it was intentional to leave these implementations out in #741, I can change this PR a source comment about it.

Fixes #762

@memoryruins memoryruins added the A-ECS Entities, components, systems, and events label Nov 1, 2020
@cart cart merged commit f81208a into bevyengine:master Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Query using the Or operator do not provide .iter() method, only iter_mut().
2 participants