From 8a1f0a29974b805d693a7d0825cd21a9b2493b51 Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Fri, 23 Jun 2023 20:08:47 +0300 Subject: [PATCH] Fix any_component_removed (#8939) # Objective `any_component_removed` condition is inversed. ## Solution Remove extra `!`. --- ## Changelog ### Fixed Fix `any_component_removed` condition. --- crates/bevy_ecs/src/schedule/condition.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_ecs/src/schedule/condition.rs b/crates/bevy_ecs/src/schedule/condition.rs index 539006c3d2d7b..5f361f931d72a 100644 --- a/crates/bevy_ecs/src/schedule/condition.rs +++ b/crates/bevy_ecs/src/schedule/condition.rs @@ -948,7 +948,7 @@ pub mod common_conditions { // Simply checking `is_empty` would not be enough. // PERF: note that `count` is efficient (not actually looping/iterating), // due to Bevy having a specialized implementation for events. - move |mut removals: RemovedComponents| !removals.iter().count() != 0 + move |mut removals: RemovedComponents| removals.iter().count() != 0 } /// Generates a [`Condition`](super::Condition) that inverses the result of passed one.