You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Objective
Closesbevyengine#21349
Provides an ergonomic way to create a `Handle<A>` from a `Uuid` at
runtime.
## Solution
Implements the `From<Uuid>` trait for `Handle<A>`, allowing users to
write:
```rust
let uuid = Uuid::new_v4();
let handle: Handle<Image> = uuid.into();
```
Instead of the current verbose approach:
```rust
let handle = Handle::<Image>::Uuid(uuid, PhantomData);
```
## Testing
- Added comprehensive test `from_uuid` that verifies:
- Conversion from `Uuid` to `Handle<A>` works correctly
- The resulting handle is a UUID variant
- The handle ID matches the input UUID
- Both `.into()` and explicit `From::from()` work
- All existing handle tests continue to pass
- Clippy and formatting checks pass
---------
Co-authored-by: Alice Cecile <[email protected]>
Co-authored-by: François Mockers <[email protected]>
0 commit comments