-
Couldn't load subscription status.
- Fork 305
Improve RecoveryId conversion functions
#800
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
Improve RecoveryId conversion functions
#800
Conversation
The `RecoveryId` is an enum but is typically serialized as an integer. We used to provide a `to_i32` function before rust-bitcoin#743. Add a `to_u8` getter to the `RecoveryId`
|
If this goes in the #765 is redundant and can be closed. |
8ef905d to
319fa08
Compare
|
In this crate you have to run the nightly formatter to get past CI. |
The `i32` is a hangover from before rust-bitcoin#743, now we have a nice enum and a `from_u8_masked` constructor (along with a `to_u8` getter) lets make the `From<RecoveryId>` impl be on `u8` instead of on `i32`.
319fa08 to
fed623e
Compare
|
Done, no other changes. |
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.
ACK fed623e; successfully ran local tests
…n functions
fed623ef9803fe28f44e7cd331e25b9149a1154b Implement From on u8 for RecoveryId instead of i32 (Tobin C. Harding)
9b4fa8bdc05ef20f4fadd7f1fb73a51cb41d1854 Add RecoveryId getter (Tobin C. Harding)
Pull request description:
Add the `to_u8` getter discussed in issue #774 and then make the `From` impl be on `u8`.
Close: #774
ACKs for top commit:
apoelstra:
ACK fed623ef9803fe28f44e7cd331e25b9149a1154b; successfully ran local tests
Tree-SHA512: 5a341cbc78d53474a8ffa8fd7fa20796da28e67d226f0298873cd22bfa137d29642b22cabcac1bc8dcd03e6547ae5272990b315dd5808d7e5c775990705cd193
…n functions
fed623ef9803fe28f44e7cd331e25b9149a1154b Implement From on u8 for RecoveryId instead of i32 (Tobin C. Harding)
9b4fa8bdc05ef20f4fadd7f1fb73a51cb41d1854 Add RecoveryId getter (Tobin C. Harding)
Pull request description:
Add the `to_u8` getter discussed in issue #774 and then make the `From` impl be on `u8`.
Close: #774
ACKs for top commit:
apoelstra:
ACK fed623ef9803fe28f44e7cd331e25b9149a1154b; successfully ran local tests
Tree-SHA512: 5a341cbc78d53474a8ffa8fd7fa20796da28e67d226f0298873cd22bfa137d29642b22cabcac1bc8dcd03e6547ae5272990b315dd5808d7e5c775990705cd193
Add the
to_u8getter discussed in issue #774 and then make theFromimpl be onu8.Close: #774