[Merged by Bors] - Move get_short_name utility method from bevy_reflect into bevy_utils#5174
[Merged by Bors] - Move get_short_name utility method from bevy_reflect into bevy_utils#5174alice-i-cecile wants to merge 9 commits intobevyengine:mainfrom
get_short_name utility method from bevy_reflect into bevy_utils#5174Conversation
sixfold-origami
left a comment
There was a problem hiding this comment.
One quibble with the docstring. Otherwise, this looks great!
Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
Nilirad
left a comment
There was a problem hiding this comment.
Didn't check line by line, but tests pass, so LGTM.
PS: There are some comment checks.
|
I was wondering whether the new dependency edge from Alternatively this could go into an entirely different crate. Which is what I needed a while ago for |
Co-authored-by: Federico Rinaldi <gisquerin@gmail.com>
|
Good to see the compile time shouldn't be affected. I'd be happy to split apart That said, creating a different crate for this or pulling in a third-party dependency is significantly more controversial. That should be done in a seperate PR, which should be much easier after this refactoring. |
|
bors r+ |
…tils` (#5174) # Summary This method strips a long type name like `bevy::render::camera::PerspectiveCameraBundle` down into the bare type name (`PerspectiveCameraBundle`). This is generally useful utility method, needed by #4299 and #5121. As a result: - This method was moved to `bevy_utils` for easier reuse. - The legibility and robustness of this method has been significantly improved. - Harder test cases have been added. This change was split out of #4299 to unblock it and make merging / reviewing the rest of those changes easier. ## Changelog - added `bevy_utils::get_short_name`, which strips the path from a type name for convenient display. - removed the `TypeRegistry::get_short_name` method. Use the function in `bevy_utils` instead.
get_short_name utility method from bevy_reflect into bevy_utilsget_short_name utility method from bevy_reflect into bevy_utils
…tils` (bevyengine#5174) # Summary This method strips a long type name like `bevy::render::camera::PerspectiveCameraBundle` down into the bare type name (`PerspectiveCameraBundle`). This is generally useful utility method, needed by bevyengine#4299 and bevyengine#5121. As a result: - This method was moved to `bevy_utils` for easier reuse. - The legibility and robustness of this method has been significantly improved. - Harder test cases have been added. This change was split out of bevyengine#4299 to unblock it and make merging / reviewing the rest of those changes easier. ## Changelog - added `bevy_utils::get_short_name`, which strips the path from a type name for convenient display. - removed the `TypeRegistry::get_short_name` method. Use the function in `bevy_utils` instead.
…tils` (bevyengine#5174) # Summary This method strips a long type name like `bevy::render::camera::PerspectiveCameraBundle` down into the bare type name (`PerspectiveCameraBundle`). This is generally useful utility method, needed by bevyengine#4299 and bevyengine#5121. As a result: - This method was moved to `bevy_utils` for easier reuse. - The legibility and robustness of this method has been significantly improved. - Harder test cases have been added. This change was split out of bevyengine#4299 to unblock it and make merging / reviewing the rest of those changes easier. ## Changelog - added `bevy_utils::get_short_name`, which strips the path from a type name for convenient display. - removed the `TypeRegistry::get_short_name` method. Use the function in `bevy_utils` instead.
…tils` (bevyengine#5174) # Summary This method strips a long type name like `bevy::render::camera::PerspectiveCameraBundle` down into the bare type name (`PerspectiveCameraBundle`). This is generally useful utility method, needed by bevyengine#4299 and bevyengine#5121. As a result: - This method was moved to `bevy_utils` for easier reuse. - The legibility and robustness of this method has been significantly improved. - Harder test cases have been added. This change was split out of bevyengine#4299 to unblock it and make merging / reviewing the rest of those changes easier. ## Changelog - added `bevy_utils::get_short_name`, which strips the path from a type name for convenient display. - removed the `TypeRegistry::get_short_name` method. Use the function in `bevy_utils` instead.

Summary
This method strips a long type name like
bevy::render::camera::PerspectiveCameraBundledown into the bare type name (PerspectiveCameraBundle). This is generally useful utility method, needed by #4299 and #5121.As a result:
bevy_utilsfor easier reuse.This change was split out of #4299 to unblock it and make merging / reviewing the rest of those changes easier.
Changelog
bevy_utils::get_short_name, which strips the path from a type name for convenient display.TypeRegistry::get_short_namemethod. Use the function inbevy_utilsinstead.