Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
asset: make HandleUntyped::id private (bevyengine#7076)
# Objective It is currently possible to break reference counting for assets by creating a strong `HandleUntyped` and then modifying the `id` field before dropping the handle. This should not be allowed. ## Solution Change the `id` field visibility to private and add a getter instead. The same change was previously done for `Handle<T>` in bevyengine#6176, but `HandleUntyped` was forgotten. --- ## Migration Guide - Instead of directly accessing the ID of a `HandleUntyped` as `handle.id`, use the new getter `handle.id()`.
- Loading branch information