From c9a07ff61b607478e264fc0581076643c750fe98 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 16 Nov 2024 17:14:20 +0100 Subject: refactor(ecs): remove system param compatability checking --- ecs/src/sole.rs | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'ecs/src/sole.rs') diff --git a/ecs/src/sole.rs b/ecs/src/sole.rs index 4a4f3af..084a06b 100644 --- a/ecs/src/sole.rs +++ b/ecs/src/sole.rs @@ -1,4 +1,4 @@ -use std::any::{type_name, Any, TypeId}; +use std::any::{type_name, Any}; use std::fmt::Debug; use std::marker::PhantomData; use std::ops::{Deref, DerefMut}; @@ -113,23 +113,6 @@ where Self::new(sole) } - - fn is_compatible>() -> bool - { - let other_comparable = Other::get_comparable(); - - let Some(comparable) = other_comparable.downcast_ref::() else { - // The other system param is not Single - return true; - }; - - TypeId::of::() != comparable.sole_type_id - } - - fn get_comparable() -> Box - { - Box::new(Comparable { sole_type_id: TypeId::of::() }) - } } impl<'world, SoleT> Deref for Single<'world, SoleT> @@ -201,8 +184,3 @@ where Single::new(&self.sole) } } - -struct Comparable -{ - sole_type_id: TypeId, -} -- cgit v1.2.3-18-g5258