Skip to content
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

Implement Reflect traits for NonZero numeric types #6332

Closed
alice-i-cecile opened this issue Oct 21, 2022 · 2 comments
Closed

Implement Reflect traits for NonZero numeric types #6332

alice-i-cecile opened this issue Oct 21, 2022 · 2 comments
Labels
A-Reflection Runtime information about types C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy

Comments

@alice-i-cecile
Copy link
Member

What problem does this solve or what need does it fill?

I want to use these types in my code, but cannot impl Reflect due to orphan rules.

What solution would you like?

Use the macro to impl this for all the numeric types in https://doc.rust-lang.org/stable/std/num/index.html.

What alternative(s) have you considered?

Write my own NonZeroU32 type :(

@alice-i-cecile alice-i-cecile added C-Usability A targeted quality-of-life change that makes Bevy easier to use A-Reflection Runtime information about types D-Trivial Nice and easy! A great choice to get started with Bevy labels Oct 21, 2022
@MrGVSV MrGVSV moved this to Open in Reflection Oct 22, 2022
@pyronide
Copy link

I'm a little confused... looks like serde has already... "adopted" non-zero types:
https://doc.servo.org/serde/lib/num/index.html

@maxwellodri
Copy link
Contributor

This was fixed by #5556 - but it was merged after 0.8 - so just waiting on bevy 0.9 for this.

Repository owner moved this from Open to Done in Reflection Oct 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Reflection Runtime information about types C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy
Projects
Status: Done
Development

No branches or pull requests

3 participants