Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow returning a value from
EntityMut::world_scope
(bevyengine#7385)
# Objective The function `EntityMut::world_scope` is a safe abstraction that allows you to temporarily get mutable access to the underlying `World` of an `EntityMut`. This function is purely stateful, meaning it is not easily possible to return a value from it. ## Solution Allow returning a computed value from the closure. This is similar to how `World::resource_scope` works. --- ## Changelog - The function `EntityMut::world_scope` now allows returning a value from the immediately-computed closure.
- Loading branch information