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

Replace use of point and scalar defaults #141

Open
AaronFeickert opened this issue Sep 3, 2024 · 0 comments · May be fixed by #142
Open

Replace use of point and scalar defaults #141

AaronFeickert opened this issue Sep 3, 2024 · 0 comments · May be fixed by #142
Assignees

Comments

@AaronFeickert
Copy link
Contributor

AaronFeickert commented Sep 3, 2024

The codebase sometimes uses the Default trait to get either the identity point of the Ristretto group (in either compressed or uncompressed form) or the zero scalar. This is fine in practice due to the implementation of that trait on the relevant types. However, it seems non-idiomatic and has a bad code smell.

It would be more idiomatic to use the Identity trait implementation for Ristretto types and the ZERO constant for scalars. This makes much more unambiguous what the intent is.

@AaronFeickert AaronFeickert self-assigned this Sep 17, 2024
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 a pull request may close this issue.

1 participant