summaryrefslogtreecommitdiff
path: root/ecs/src/component.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ecs/src/component.rs')
-rw-r--r--ecs/src/component.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/ecs/src/component.rs b/ecs/src/component.rs
index 4d37cb8..35e5430 100644
--- a/ecs/src/component.rs
+++ b/ecs/src/component.rs
@@ -180,7 +180,9 @@ pub trait RefSequence
{
type Handles<'component>;
- fn metadata() -> impl Array<Metadata>;
+ type Metadata: Array<Metadata>;
+
+ fn metadata() -> Self::Metadata;
fn from_components<'component>(
components: &'component [EntityComponent],
@@ -330,7 +332,9 @@ macro_rules! inner {
{
type Handles<'component> = (#(CompRef~I::Handle<'component>,)*);
- fn metadata() -> impl Array<Metadata>
+ type Metadata = [Metadata; $c + 1];
+
+ fn metadata() -> Self::Metadata
{
[#(
Metadata {
@@ -397,8 +401,9 @@ impl Sequence for ()
impl RefSequence for ()
{
type Handles<'component> = ();
+ type Metadata = [Metadata; 0];
- fn metadata() -> impl Array<Metadata>
+ fn metadata() -> Self::Metadata
{
[]
}