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

Make the field module a bit more public #38

Merged
merged 1 commit into from
Mar 23, 2020
Merged

Conversation

tuxxy
Copy link
Contributor

@tuxxy tuxxy commented Mar 20, 2020

What this does:

  1. Exports the field_const and field_const_raw macros.
  2. Makes the Field struct fields n, magnitude, and normalized public.
  3. Resolves Constant macros are unusable because the field module is private. #37

As detailed in #37, the useful macros affine_const and jacobian_const are not really usable because the field module isn't really usable outside the crate. This loosens these constraints a bit and exports the field_const macro which makes the aforementioned macros usable.

Exports the field_const and field_const_raw macros.
Sets the Field struct fields n, magnitude, and normalized to public.
Copy link
Member

@sorpaas sorpaas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now I think this is alright. In the future I think we can consider to switch using const fns.

@sorpaas sorpaas merged commit 58816a9 into paritytech:master Mar 23, 2020
@tuxxy
Copy link
Contributor Author

tuxxy commented Mar 23, 2020

@sorpaas Thanks for being quick on this. const fns sound like a good pattern in the future for sure. :)

trevor-crypto pushed a commit to monacohq/libsecp256k1 that referenced this pull request May 31, 2022
Exports the field_const and field_const_raw macros.
Sets the Field struct fields n, magnitude, and normalized to public.
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.

Constant macros are unusable because the field module is private.
2 participants