bevy/crates/bevy_asset
CowSociety ad0af31b05
Make SavedAsset::get_labeled accept &str as label (#11612)
# Objective

- SavedAsset's iter_labels returns ```&str```, however accessing
LabeledAssets requires ```CowArc<'static, str>```
- Although SavedAsset holds UntypedHandles in its hashmap of
LabeledAssets, they are inaccessible as LabeledAssets are casted to
SavedAsset or ErasedLoadedAsset, which don't contain their
UntypedHandles
- Adresses #11609

## Solution

- Used Trait bounds to allow for either ```CowArc<'static, str>``` or
```&str``` to be used as a label in get_labeled and get_erased_labeled.
- Added method get_untyped_handle to get UntypedHandle from the
LabeledAsset.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2024-01-30 22:18:41 +00:00
..
macros Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
src Make SavedAsset::get_labeled accept &str as label (#11612) 2024-01-30 22:18:41 +00:00
Cargo.toml Remove trailing whitespace (#10723) 2023-11-24 16:31:55 +00:00