Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make public macros more robust with $crate (bevyengine#4655)
# Objective We have some macros that are public but only used internally for now. They fail on user's code due to the use of crate names like `bevy_utils`, while the user only has `bevy::utils`. There are two affected macros. - `bevy_utils::define_label`: it may be useful in user's code for defining custom kinds of label traits (this is why I made this PR). - `bevy_asset::load_internal_asset`: not useful currently due to limitations of the debug asset server, but this may change in the future. ## Solution We can make them work by using `$crate` instead of names of their own crates, which can refer to the macro's defining crate regardless of the user's setup. Even though our objective is rather low-priority here, the solution adds no maintenance cost so it is still worthwhile.
- Loading branch information