-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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] - Implemented Reflect
for all the ranges
#5806
Conversation
@@ -41,6 +41,11 @@ impl_reflect_value!(String(Debug, Hash, PartialEq, Serialize, Deserialize)); | |||
impl_reflect_value!(Result<T: Clone + Reflect + 'static, E: Clone + Reflect + 'static>()); | |||
impl_reflect_value!(HashSet<T: Hash + Eq + Clone + Send + Sync + 'static>()); | |||
impl_reflect_value!(Range<T: Clone + Send + Sync + 'static>()); | |||
impl_reflect_value!(RangeInclusive<T: Clone + Send + Sync + 'static>()); |
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.
Nit: Not that you have to, since none of the others do this, but you could replace some of those bounds with Reflect
itself:
impl_reflect_value!(RangeInclusive<T: Clone + Send + Sync + 'static>()); | |
impl_reflect_value!(RangeInclusive<T: Clone + Reflect>()); |
Feel free to resolve this if you'd rather keep it as is haha
Edit: I guess this suggestion would require that the inner type is reflectable as well, which might be a good reason to hold off on applying it.
impl_reflect_value!(Range<T: Clone + Send + Sync + 'static>()); | ||
impl_reflect_value!(RangeInclusive<T: Clone + Send + Sync + 'static>()); | ||
impl_reflect_value!(RangeFrom<T: Clone + Send + Sync + 'static>()); | ||
impl_reflect_value!(RangeTo<T: Clone + Send + Sync + 'static>()); | ||
impl_reflect_value!(RangeToInclusive<T: Clone + Send + Sync + 'static>()); |
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.
Nit: You have an extra space before each Send
(likely due to Range
having one too).
impl_reflect_value!(Range<T: Clone + Send + Sync + 'static>()); | |
impl_reflect_value!(RangeInclusive<T: Clone + Send + Sync + 'static>()); | |
impl_reflect_value!(RangeFrom<T: Clone + Send + Sync + 'static>()); | |
impl_reflect_value!(RangeTo<T: Clone + Send + Sync + 'static>()); | |
impl_reflect_value!(RangeToInclusive<T: Clone + Send + Sync + 'static>()); | |
impl_reflect_value!(Range<T: Clone + Send + Sync + 'static>()); | |
impl_reflect_value!(RangeInclusive<T: Clone + Send + Sync + 'static>()); | |
impl_reflect_value!(RangeFrom<T: Clone + Send + Sync + 'static>()); | |
impl_reflect_value!(RangeTo<T: Clone + Send + Sync + 'static>()); | |
impl_reflect_value!(RangeToInclusive<T: Clone + Send + Sync + 'static>()); |
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'd make these changes myself, but I've been disallowed from pushing to this branch :)
Worth blocking on as we'll just forget about it if we merge now.
Eh actually I'll just follow up. No sense waiting around |
bors r+ |
# Objective Fixes #5763 ## Solution Implemented as reflect value like the current `Range`. Is there a benefit to changing everything to a reflect struct?
Pull request successfully merged into main. Build succeeded: |
Reflect
for all the rangesReflect
for all the ranges
# Objective Fixes bevyengine#5763 ## Solution Implemented as reflect value like the current `Range`. Is there a benefit to changing everything to a reflect struct?
# Objective Fixes bevyengine#5763 ## Solution Implemented as reflect value like the current `Range`. Is there a benefit to changing everything to a reflect struct?
Objective
Fixes #5763
Solution
Implemented as reflect value like the current
Range
. Is there a benefit to changing everything to a reflect struct?