docs/bevy/release-content/migration-guides/name_from_specialization.md 384 B · 8 lines · raw · history

1 ---
2 title: "`&str`s must now have a static lifetime to be converted to `Name`"
3 pull_requests: [24544]
4 ---
5
6 A `From<&str>` implementation for `Name` has been replaced with a `From<&'static str>` implementation for `Name`. This was done to avoid unexpected allocations.
7
8 If you do not mind the extra allocation, you can use `Name::new(non_static_str.to_owned())` for previous behavior.