diff options
author | HampusM <hampus@hampusmat.com> | 2025-04-14 17:39:05 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2025-04-14 17:39:05 +0200 |
commit | 799e66c3c92269aef8ba791b9db5661c625dfb95 (patch) | |
tree | 67bfe73947428ec84b01ecdc31edfd3af1ab2e42 /ecs/src/component.rs | |
parent | 3d2d3e51b6559b80bf945caa9914e557401e51d0 (diff) |
refactor(ecs): remove component::Ref trait
Diffstat (limited to 'ecs/src/component.rs')
-rw-r--r-- | ecs/src/component.rs | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/ecs/src/component.rs b/ecs/src/component.rs index cc4b460..de4384b 100644 --- a/ecs/src/component.rs +++ b/ecs/src/component.rs @@ -77,29 +77,6 @@ pub trait Sequence fn into_parts_array(self) -> Self::PartsArray; } -/// A mutable or immutable reference to a component. -pub trait Ref -{ - type Component: Component; - type Handle<'component>: HandleFromEntityComponentRef<'component>; -} - -impl<ComponentT> Ref for &ComponentT -where - ComponentT: Component, -{ - type Component = ComponentT; - type Handle<'component> = ComponentT::Handle<'component>; -} - -impl<ComponentT> Ref for &mut ComponentT -where - ComponentT: Component, -{ - type Component = ComponentT; - type Handle<'component> = ComponentT::HandleMut<'component>; -} - /// [`Component`] metadata. #[derive(Debug, Clone)] #[non_exhaustive] |