-
Notifications
You must be signed in to change notification settings - Fork 356
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 TryFrom for the decimals' respective integers #2075
Conversation
7b0ff69
to
bd234a5
Compare
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.
Nice!
While we are here, could you do the same for the signed version? I.e. add
- Int256 -> SignedDecimal256
- Int128 -> SignedDecimal
using the same pattern
Oh sure, completely overlooked those |
CI is complaining about test coverage and kinda has a point here. Could you add a simple test for each of the functions? The majority of cases is handled by |
Sure, the tests now assert the conversion was lossless (i.e. the |
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.
Yeah, nice. This tests the numeric value to be the same 👍
Closes #2069