Skip to content

Commit

Permalink
Deprecate QueryState::for_each_unchecked (#10815)
Browse files Browse the repository at this point in the history
# Objective

Resolves Issue #10772.

## Solution

Added the deprecated warning for QueryState::for_each_unchecked, as
noted in the comments of PR #6773.
Followed the wording in the deprecation messages for `for_each` and
`for_each_mut`
  • Loading branch information
asuratos committed Dec 1, 2023
1 parent 2148518 commit cbf39b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/bevy_ecs/src/query/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1040,6 +1040,10 @@ impl<Q: WorldQueryData, F: WorldQueryFilter> QueryState<Q, F> {
/// This does not check for mutable query correctness. To be safe, make sure mutable queries
/// have unique access to the components they query.
#[inline]
#[deprecated(
since = "0.13.0",
note = "QueryState::for_each_unchecked was not idiomatic Rust and has been moved to query.iter_unchecked_manual().for_each()"
)]
pub unsafe fn for_each_unchecked<'w, FN: FnMut(Q::Item<'w>)>(
&mut self,
world: UnsafeWorldCell<'w>,
Expand Down

0 comments on commit cbf39b7

Please sign in to comment.