Remove docs from witness version conversion functions
These docs do not add that much value, we do not typically bother documenting `From` and `TryFrom` implementations because they are super well known and its obvious from the function signature what is going on.
This commit is contained in:
parent
47d6d785cb
commit
52f2332383
|
@ -156,14 +156,12 @@ impl<'a> TryFrom<Instruction<'a>> for WitnessVersion {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<WitnessVersion> for bech32::u5 {
|
impl From<WitnessVersion> for bech32::u5 {
|
||||||
/// Converts [`WitnessVersion`] instance into corresponding Bech32(m) u5-value ([`bech32::u5`]).
|
|
||||||
fn from(version: WitnessVersion) -> Self {
|
fn from(version: WitnessVersion) -> Self {
|
||||||
bech32::u5::try_from_u8(version.to_num()).expect("WitnessVersion must be 0..=16")
|
bech32::u5::try_from_u8(version.to_num()).expect("WitnessVersion must be 0..=16")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<WitnessVersion> for Opcode {
|
impl From<WitnessVersion> for Opcode {
|
||||||
/// Converts [`WitnessVersion`] instance into corresponding Bitcoin scriptopcode (`OP_0`..`OP_16`).
|
|
||||||
fn from(version: WitnessVersion) -> Opcode {
|
fn from(version: WitnessVersion) -> Opcode {
|
||||||
match version {
|
match version {
|
||||||
WitnessVersion::V0 => OP_PUSHBYTES_0,
|
WitnessVersion::V0 => OP_PUSHBYTES_0,
|
||||||
|
|
Loading…
Reference in New Issue