Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix init_non_send_resource overwriting previous values (bevyengine#7261)
# Objective Repeated calls to `init_non_send_resource` currently overwrite the old value because the wrong storage is being checked. ## Solution Use the correct storage. Add some tests. ## Notes Without the fix, the new test fails with ``` thread 'world::tests::init_non_send_resource_does_not_overwrite' panicked at 'assertion failed: `(left == right)` left: `1`, right: `0`', crates/bevy_ecs/src/world/mod.rs:2267:9 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace test world::tests::init_non_send_resource_does_not_overwrite ... FAILED ``` This was introduced by bevyengine#7174 and it seems like a fairly straightforward oopsie.
- Loading branch information