Skip to content

Commit

Permalink
Update crates/bevy_ecs/src/query/access.rs docs
Browse files Browse the repository at this point in the history
Co-authored-by: Alice Cecile <[email protected]>
  • Loading branch information
mvlabat and alice-i-cecile authored Feb 17, 2023
1 parent ba9cb81 commit e6d6550
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/bevy_ecs/src/query/access.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ impl<T: SparseSetIndex> FilteredAccess<T> {

/// Adds a `With` filter: corresponds to a conjunction (AND) operation.
///
/// For example, in case we have `Or<(With<A>, With<B>)>`, which is represented by an array of two `AccessFilter` instances,
/// adding `AND With<C>` gets expanded into `Or<((With<A>, With<C>), (With<B>, With<C>))>`.
/// Suppose we begin with `Or<(With<A>, With<B>)>`, which is represented by an array of two `AccessFilter` instances.
/// Adding `AND With<C>` via this method transforms it into the equivalent of `Or<((With<A>, With<C>), (With<B>, With<C>))>`.
pub fn and_with(&mut self, index: T) {
let index = index.sparse_set_index();
for filter in &mut self.filter_sets {
Expand Down

0 comments on commit e6d6550

Please sign in to comment.