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

Add ConstOne and ConstZero implementation #105

Merged
merged 2 commits into from
Apr 27, 2024

Conversation

saona-raimundo
Copy link
Contributor

Solves #104

The implementation requires extra trait bounds on the generic T since the traits ConstOne and ConstZero are not required for the trait Integer.
This is because types that require allocations should not implement ConstOne and ConstZero.
For example, arbitrary precision numbers.

I added the bounds of ConstOne or ConstZero where needed.

@dnsl48
Copy link
Owner

dnsl48 commented Apr 15, 2024

That looks great, thank you!
Could you please also add a simple test to validate the values of the new traits constants?

@saona-raimundo
Copy link
Contributor Author

Sure! Done.
Let me know if they are too simple.

@dnsl48 dnsl48 merged commit aca926a into dnsl48:master Apr 27, 2024
2 of 3 checks passed
@dnsl48
Copy link
Owner

dnsl48 commented Apr 27, 2024

No, that is good.
Thank you for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants