summaryrefslogtreecommitdiff
path: root/ecs/src/relationship.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2025-04-08 17:19:30 +0200
committerHampusM <hampus@hampusmat.com>2025-04-08 17:19:30 +0200
commit7276f9c72f53f02820c3238f72d099221daf7afd (patch)
treed523d0c01a9cd35bcc44401b46d9c8d36bbb10c1 /ecs/src/relationship.rs
parente4818dd4f0a57a2c9af8859253f570607f64bb12 (diff)
refactor(ecs): replace optional components with Option query term
Diffstat (limited to 'ecs/src/relationship.rs')
-rw-r--r--ecs/src/relationship.rs40
1 files changed, 0 insertions, 40 deletions
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<RelationMut<'rel_comp, Kind, ComponentT>>
-where
- ComponentT: Component,
-{
- type Error = ComponentHandleError;
-
- fn from_entity_component_ref(
- entity_component_ref: Option<EntityComponentRef<'rel_comp>>,
- world: &'rel_comp World,
- ) -> Result<Self, Self::Error>
- {
- 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<Relation<'rel_comp, Kind, ComponentT>>
-where
- ComponentT: Component,
-{
- type Error = ComponentHandleError;
-
- fn from_entity_component_ref(
- entity_component_ref: Option<EntityComponentRef<'rel_comp>>,
- world: &'rel_comp World,
- ) -> Result<Self, ComponentHandleError>
- {
- 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,