From ddf2dfd24171d64990ed52347513a7e1954d0896 Mon Sep 17 00:00:00 2001 From: JoJoJet <21144246+JoJoJet@users.noreply.github.com> Date: Sat, 22 Jul 2023 21:58:31 -0400 Subject: [PATCH] fix `for_each_mut` --- crates/bevy_ecs/src/query/par_iter.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/crates/bevy_ecs/src/query/par_iter.rs b/crates/bevy_ecs/src/query/par_iter.rs index fb0592589c049..4d03a2266fe37 100644 --- a/crates/bevy_ecs/src/query/par_iter.rs +++ b/crates/bevy_ecs/src/query/par_iter.rs @@ -148,14 +148,9 @@ impl<'w, 's, Q: WorldQuery, F: ReadOnlyWorldQuery> QueryParIter<'w, 's, Q, F> { /// /// [`ComputeTaskPool`]: bevy_tasks::ComputeTaskPool #[inline] - #[deprecated = "use `.for_each(...)` instead. `for_each_mut` is no longer functional and will be removed in the next release of Bevy."] - pub fn for_each_mut) + Send + Sync + Clone>(&mut self, _func: FN) { - unimplemented!( - "{}{}{}", - "The method `QueryParIter::for_each_mut` is no longer supported as of Bevy 0.11, ", - "And will be removed in the next release. Use `for_each` instead, which now supports ", - "mutable queries in addition to read-only queries." - ); + #[deprecated = "use `.for_each(...)` instead."] + pub fn for_each_mut) + Send + Sync + Clone>(self, func: FN) { + self.for_each(func); } fn get_batch_size(&self, thread_count: usize) -> usize {