bevy/crates/bevy_asset
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
..
src Allow String and &String as Id for AssetServer.get_handle(id) (#3280) 2021-12-09 22:40:15 +00:00
Cargo.toml Update dependencies ron winit& fix cargo-deny lists (#3244) 2021-12-09 20:14:00 +00:00