bevy/crates/bevy_asset/src/server
andriyDev 38058965ef
Restructure the logic in AssetServer::load_internal to avoid using weak handles. (#19634)
# Objective

- A step towards #19024.
- The logic here was kinda complex before.

## Solution

- I've restructured the logic here while preserving the behavior (as far
as I can tell).
- We no longer return the handle if it was passed in. The caller should
already have access to it, and the returned handle will be a weak
handle, not a strong handle (which can cause issues). This prevents us
from needing weak handles at all here.
- I verified the callers do not need the return value. The only callsite
that needs the returned handle does not pass in the input_handle
argument.

## Testing

- CI
2025-06-30 22:39:59 +00:00
..
info.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
loaders.rs Rename bevy_platform_support to bevy_platform (#18813) 2025-04-11 23:13:28 +00:00
mod.rs Restructure the logic in AssetServer::load_internal to avoid using weak handles. (#19634) 2025-06-30 22:39:59 +00:00