refactor: collect collections

This commit is contained in:
🪞👃🪞 2024-09-06 23:14:27 +03:00
parent a52066f640
commit 1d21071c86
6 changed files with 78 additions and 82 deletions

View file

@ -8,16 +8,6 @@ pub trait Exit: Send {
}
}
/// Marker trait for [Component]s that can [Exit]
pub trait ExitableComponent<E>: Exit + Component<E> where E: Engine {
/// Perform type erasure for collecting heterogeneous components.
fn boxed (self) -> Box<dyn ExitableComponent<E>> where Self: Sized + 'static {
Box::new(self)
}
}
impl<E: Engine, C: Component<E> + Exit> ExitableComponent<E> for C {}
#[macro_export] macro_rules! exit {
($T:ty) => {
impl Exit for $T {