bevy/crates
Weasy a2f0fe24e8 Allow String and &String as Id for AssetServer.get_handle(id) (#3280)
# Objective

Make it easier to build and use an asset path with `format!()`. This can be useful for accessing assets in a loop.

Enabled by this PR:
```rust
let monkey_handle = asset_server.get_handle(&format!("models/monkey/Monkey.gltf#Mesh0/Primitive0"));
let monkey_handle = asset_server.get_handle(format!("models/monkey/Monkey.gltf#Mesh0/Primitive0"));
```

Before this PR:
```rust
let monkey_handle = asset_server.get_handle(format!("models/monkey/Monkey.gltf#Mesh0/Primitive0").as_str());
```

It's just a tiny improvement in ergonomics, but i ran into it and was wondering why the function does not accept a `String` and Bevy is all about simplicity/ergonomics, right? 😄😉

## Solution

Implement `Into<HandleId>` for `String` and `&String`.
2021-12-09 22:40:15 +00:00
..
bevy_app Update dependencies ron winit& fix cargo-deny lists (#3244) 2021-12-09 20:14:00 +00:00
bevy_asset Allow String and &String as Id for AssetServer.get_handle(id) (#3280) 2021-12-09 22:40:15 +00:00
bevy_audio Remove wasm audio feature flag for 2021 (#3000) 2021-11-11 01:17:38 +00:00
bevy_core Made Time::time_since_startup return from last tick. (#3264) 2021-12-07 01:30:08 +00:00
bevy_derive Merge New Renderer 2021-11-22 23:57:42 -08:00
bevy_diagnostic Update to edition 2021 on master (#3028) 2021-10-27 00:12:14 +00:00
bevy_dylib Update to edition 2021 on master (#3028) 2021-10-27 00:12:14 +00:00
bevy_dynamic_plugin Update to edition 2021 on master (#3028) 2021-10-27 00:12:14 +00:00
bevy_ecs More Bevy ECS schedule spans (#3281) 2021-12-08 23:43:03 +00:00
bevy_ecs_compile_fail_tests Fix clippy lints for 1.57 (#3238) 2021-12-02 23:40:37 +00:00
bevy_gilrs Update to edition 2021 on master (#3028) 2021-10-27 00:12:14 +00:00
bevy_gltf Fix clippy lints for 1.57 (#3238) 2021-12-02 23:40:37 +00:00
bevy_input Add Gamepads resource (#3257) 2021-12-08 20:28:08 +00:00
bevy_internal Update dependencies ron winit& fix cargo-deny lists (#3244) 2021-12-09 20:14:00 +00:00
bevy_log Merge New Renderer 2021-11-22 23:57:42 -08:00
bevy_macro_utils Fix path used by macro not considering that we can use a sub-crate (#3178) 2021-11-29 23:10:31 +00:00
bevy_math Merge New Renderer 2021-11-22 23:57:42 -08:00
bevy_pbr Update to edition 2021 on master (#3028) 2021-10-27 00:12:14 +00:00
bevy_reflect Update dependencies ron winit& fix cargo-deny lists (#3244) 2021-12-09 20:14:00 +00:00
bevy_render Check for NaN in Camera::world_to_screen() (#3268) 2021-12-08 01:31:31 +00:00
bevy_scene Update dependencies ron winit& fix cargo-deny lists (#3244) 2021-12-09 20:14:00 +00:00
bevy_sprite Fix clippy lints for 1.57 (#3238) 2021-12-02 23:40:37 +00:00
bevy_tasks Add readme to errors crate and clean up cargo files (#3125) 2021-11-13 23:06:48 +00:00
bevy_text Update to edition 2021 on master (#3028) 2021-10-27 00:12:14 +00:00
bevy_transform Add despawn_children (#2903) 2021-12-09 20:42:44 +00:00
bevy_ui Add docstring comment to Style to reference CSS (#2936) 2021-11-06 20:53:10 +00:00
bevy_utils Merge New Renderer 2021-11-22 23:57:42 -08:00
bevy_wgpu Merge New Renderer 2021-11-22 23:57:42 -08:00
bevy_window Update dependencies ron winit& fix cargo-deny lists (#3244) 2021-12-09 20:14:00 +00:00
bevy_winit Update dependencies ron winit& fix cargo-deny lists (#3244) 2021-12-09 20:14:00 +00:00
crevice Fix clippy lints for 1.57 (#3238) 2021-12-02 23:40:37 +00:00