From 7276f9c72f53f02820c3238f72d099221daf7afd Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 8 Apr 2025 17:19:30 +0200 Subject: refactor(ecs): replace optional components with Option query term --- ecs/src/relationship.rs | 40 ---------------------------------------- 1 file changed, 40 deletions(-) (limited to 'ecs/src/relationship.rs') diff --git a/ecs/src/relationship.rs b/ecs/src/relationship.rs index c5399e4..e368dd4 100644 --- a/ecs/src/relationship.rs +++ b/ecs/src/relationship.rs @@ -103,26 +103,6 @@ where } } -impl<'rel_comp, Kind, ComponentT> HandleFromEntityComponentRef<'rel_comp> - for Option> -where - ComponentT: Component, -{ - type Error = ComponentHandleError; - - fn from_entity_component_ref( - entity_component_ref: Option>, - world: &'rel_comp World, - ) -> Result - { - entity_component_ref - .map(|entity_comp| { - RelationMut::from_entity_component_ref(Some(entity_comp), world) - }) - .transpose() - } -} - impl<'rel_comp, Kind, ComponentT> RelationMut<'rel_comp, Kind, ComponentT> where ComponentT: Component, @@ -328,26 +308,6 @@ where } } -impl<'rel_comp, Kind, ComponentT> HandleFromEntityComponentRef<'rel_comp> - for Option> -where - ComponentT: Component, -{ - type Error = ComponentHandleError; - - fn from_entity_component_ref( - entity_component_ref: Option>, - world: &'rel_comp World, - ) -> Result - { - entity_component_ref - .map(|entity_comp| { - Relation::from_entity_component_ref(Some(entity_comp), world) - }) - .transpose() - } -} - impl<'rel_comp, Kind, ComponentT> Relation<'rel_comp, Kind, ComponentT> where ComponentT: Component, -- cgit v1.2.3-18-g5258