amethyst / amethyst/legion

Unsound fn ComponentStorage::move_entity

未关闭
#9 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Rust
星标
1.7k
派生
140
PR 合并指标
30 天内没有已合并 PR

描述

(`@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...

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。