Remove From<newtype> for $hash
We provide the from/to_byte_array functions for casting between arrays. We shouldn't be supporting calls to `into` to quickly do the cast. We already removed the other direction, now remove this one.
This commit is contained in:
parent
6b2b89c2f7
commit
db9ec3bed8
|
@ -158,12 +158,6 @@ macro_rules! hash_newtype {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl $crate::_export::_core::convert::From<$newtype> for $hash {
|
|
||||||
fn from(hashtype: $newtype) -> $hash {
|
|
||||||
hashtype.0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl $crate::Hash for $newtype {
|
impl $crate::Hash for $newtype {
|
||||||
type Bytes = <$hash as $crate::Hash>::Bytes;
|
type Bytes = <$hash as $crate::Hash>::Bytes;
|
||||||
|
|
||||||
|
|
|
@ -151,7 +151,7 @@ impl Transaction {
|
||||||
.collect(),
|
.collect(),
|
||||||
output: self.output.clone(),
|
output: self.output.clone(),
|
||||||
};
|
};
|
||||||
cloned_tx.compute_txid().into()
|
sha256d::Hash::from_byte_array(cloned_tx.compute_txid().to_byte_array())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Computes the [`Txid`].
|
/// Computes the [`Txid`].
|
||||||
|
|
Loading…
Reference in New Issue