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 from_char_unchecked public #164

Merged
merged 2 commits into from
Jan 8, 2024

Conversation

tcharding
Copy link
Member

@tcharding tcharding commented Jan 7, 2024

  • Patch 1 is an error type clean up, part of this PR because it improves the error type returned by from_char.
  • Patch 2 documents the error return of from_char and makes from_char_unchecked public.

Fix: #161

The `gf32::Error` type is too general.

Split the error into two separate error types so that `from_char` and
`try_from` each return an error type in which all variants are used.
The `from_char_unchecked` function is useful outside for users of the
crate, make it public and document the panic case.

Add rustdocs to `from_char` and `from_char_unchecked`, and make
`from_char_unchecked` public.
@tcharding tcharding force-pushed the 01-08-from_char_unchecked branch from cc2271a to ca2f840 Compare January 7, 2024 22:07
Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK ca2f840

@apoelstra apoelstra merged commit 6d489a7 into rust-bitcoin:master Jan 8, 2024
12 checks passed
@tcharding tcharding deleted the 01-08-from_char_unchecked branch January 9, 2024 01:23
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.

Fe32::from_char_unchecked ought to be public
2 participants