Skip to content

Commit

Permalink
Fix documentation for QueryState::iter_manual (#3644)
Browse files Browse the repository at this point in the history
# Objective

- Fixes #3616 

## Solution

- As described in the issue, documentation for `iter_manual` was copied from `iter_combinations` and did not reflect the behavior of the method. I've pulled some information from #2351 to create a more accurate description.
  • Loading branch information
L-french committed Jan 13, 2022
1 parent 84144c9 commit 7fd781e
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions crates/bevy_ecs/src/query/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,16 +276,10 @@ where
}
}

/// Returns an [`Iterator`] over all possible combinations of `K` query results without repetition.
/// This can only be called for read-only queries.
///
/// For permutations of size K of query returning N results, you will get:
/// - if K == N: one permutation of all query results
/// - if K < N: all possible K-sized combinations of query results, without repetition
/// - if K > N: empty set (no K-sized combinations exist)
/// Returns an [`Iterator`] over the query results for the given [`World`] without updating the query's archetypes.
/// Archetypes must be manually updated before by using [`Self::update_archetypes`].
///
/// This can only be called for read-only queries, see [`Self::iter_combinations_mut`] for
/// write-queries.
/// This can only be called for read-only queries.
#[inline]
pub fn iter_manual<'w, 's>(
&'s self,
Expand Down

0 comments on commit 7fd781e

Please sign in to comment.