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:
Tobin C. Harding 2025-03-20 14:34:59 +11:00
parent 6b2b89c2f7
commit db9ec3bed8
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
2 changed files with 1 additions and 7 deletions

View File

@ -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 {
type Bytes = <$hash as $crate::Hash>::Bytes;

View File

@ -151,7 +151,7 @@ impl Transaction {
.collect(),
output: self.output.clone(),
};
cloned_tx.compute_txid().into()
sha256d::Hash::from_byte_array(cloned_tx.compute_txid().to_byte_array())
}
/// Computes the [`Txid`].