diff options
Diffstat (limited to 'ecs/src/query.rs')
-rw-r--r-- | ecs/src/query.rs | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/ecs/src/query.rs b/ecs/src/query.rs index f642156..7542f0d 100644 --- a/ecs/src/query.rs +++ b/ecs/src/query.rs @@ -198,10 +198,6 @@ impl_terms_builder! { #[allow(unused_mut)] fn with<ComponentT: Component>(mut self) -> Self { - if ComponentT::is_optional() { - return self; - } - let insert_index = self.required_components .partition_point(|id| *id <= ComponentT::id()); @@ -214,13 +210,6 @@ impl_terms_builder! { #[allow(unused_mut)] fn without<ComponentT: Component>(mut self) -> Self { - if ComponentT::is_optional() { - panic!( - "{}::without cannot take optional component", - type_name::<Self>() - ); - } - let insert_index = self.excluded_components .partition_point(|id| *id <= ComponentT::id()); |