Remove From<EcdsaSigHashType> for u32

We have conversion functions that include suffixes `_consensus`
and `_standard` to make it explicit what guarantees are provided by the
returned `u32` value. The `From` implementation reduces the clarity of
the API.
This commit is contained in:
Tobin Harding 2022-02-22 18:56:13 +00:00
parent b7adaf69f3
commit 2bd71c3748
1 changed files with 0 additions and 6 deletions

View File

@ -859,12 +859,6 @@ impl EcdsaSigHashType {
pub fn as_u32(self) -> u32 { self as u32 } pub fn as_u32(self) -> u32 { self as u32 }
} }
impl From<EcdsaSigHashType> for u32 {
fn from(t: EcdsaSigHashType) -> u32 {
t.as_u32()
}
}
/// Error returned when parsing `SigHashType` fails. /// Error returned when parsing `SigHashType` fails.
/// ///
/// This is currently returned for unrecognized sighash strings. /// This is currently returned for unrecognized sighash strings.