Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[Merged by Bors] - bevy_reflect_derive: Tidying up the code #4712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - bevy_reflect_derive: Tidying up the code #4712
Changes from all commits
0c65b87
4c3f1d6
bd57543
c513157
e7604cf
226405f
9708d36
a15af0e
f5c0e10
f5d651c
768750b
0c70b78
1538bf9
a4d88ad
86d0b42
7b32e97
7e2fcbe
c72b56f
e77f20f
ca2b137
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if it would make sense to add Default as a special trait- it definitely has special behavior, and allowing a special custom function for it like this would be nice.
Outside of the scope of this PR, but occurred to me nonetheless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense to me. It would involve adding a
Reflect::reflect_default()
method or something though. "Special traits" aren't stored as type data like other traits (can't access it via the registry). So we either add that method toReflect
and removeReflectDefault
or we make all "special traits" accessible from the registry as well.But yeah that's probably best for a follow up PR (maybe even in #4140).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this in #4140 at first glance.