Skip to content

Commit cbf39b7

Browse files
authored
Deprecate QueryState::for_each_unchecked (#10815)
# 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`
1 parent 2148518 commit cbf39b7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/bevy_ecs/src/query/state.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1040,6 +1040,10 @@ impl<Q: WorldQueryData, F: WorldQueryFilter> QueryState<Q, F> {
10401040
/// This does not check for mutable query correctness. To be safe, make sure mutable queries
10411041
/// have unique access to the components they query.
10421042
#[inline]
1043+
#[deprecated(
1044+
since = "0.13.0",
1045+
note = "QueryState::for_each_unchecked was not idiomatic Rust and has been moved to query.iter_unchecked_manual().for_each()"
1046+
)]
10431047
pub unsafe fn for_each_unchecked<'w, FN: FnMut(Q::Item<'w>)>(
10441048
&mut self,
10451049
world: UnsafeWorldCell<'w>,

0 commit comments

Comments
 (0)