Indra-db / flecs-ecs-rs

a Rust API for Flecs : a fast entity component system (ECS)
MIT License
13 stars 4 forks source link

potentially issue with &ZST with enqueued events #88

Open andrewgazelka opened 3 weeks ago

andrewgazelka commented 3 weeks ago

I see it must contain data. I don't know if this is related. oddly it seems to work if I have a ZST but not for &Zst

https://github.com/Indra-db/flecs-ecs-rs/blob/9266f1ad2c140749aaa86d61973e17f4d870cb0e/flecs_ecs/src/core/entity_view/entity_view_const.rs#L2181

technically though I am calling this directly (should add docs too imo) https://github.com/Indra-db/flecs-ecs-rs/blob/acadca5bd9dd05d1b778f255f58084b47df5a128/flecs_ecs/src/core/event.rs#L197

kinda confused why it cannot be a Zst... shouldn't we also panic if it is a Zst if it truly breaks things? should not affect performance as compiler should be able to remove it I reckon.