legion
legion copied to clipboard
Unsound fn ComponentStorage::move_entity
(@mooman219#0454 pointed this out to me on the community rust discord)
In a release build, this will access out-of-bounds - the fn should likely be marked unsafe, or the debug_assert upgraded to a regular assert: https://github.com/TomGillen/legion/blob/98a1cc44bf46a6df55d10b180ccf7ec73233a9ea/src/storage.rs#L924-L930
I'm not sure if there's a way to get your hands on a ComponentStorage using the public/safe interface of legion, although the type is publicly exported as legion::storage::ComponentStorage. Might be worth constraining some of these types to pub(crate) if they're inaccessable from the public API...