-
Notifications
You must be signed in to change notification settings - Fork 5
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
generalize-curve: move CurvePoint behind a trait #557
Conversation
Co-authored-by: naure <[email protected]>
generalize-scalar: move scalar usages behind a trait
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.
Hello,
I left some minor feedback. Overall this looks good to me. This change is very impressive. It adds quite a bit of complexity specially with the Generics + associated types and lifetimes. But it all seems to work. And IDK how we would do this any simpler.
My only real thought. I notice we have a pattern of C: CurveTrait + 'static
throughout. I wonder if it would be possible to fold in the 'static
lifetime as part of the definition on trait CurveTrait
. This way we wouldn't need to list it in so many places (IDK this may not work). The observation is that we don't have a use case for our C: CurveTrait
to ever have a non-static lifetime, i.e some reference.
Indeed moving static to CurveTrait allowed to remove a lot of repeated code. Thank you. |
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.
LGTM!
In this PR we make the following changes:
CurveTrait
).ScalarTrait
).VerifyingKeyTrait
).SignatureTrait
).<C>
) everywhere.(joint work with @emmorais)