diff --git a/bitcoin/src/taproot/merkle_branch/buf.rs b/bitcoin/src/taproot/merkle_branch/buf.rs index 1902d9b2a..d06ffcadf 100644 --- a/bitcoin/src/taproot/merkle_branch/buf.rs +++ b/bitcoin/src/taproot/merkle_branch/buf.rs @@ -181,15 +181,15 @@ impl<'a> IntoIterator for &'a mut TaprootMerkleBranchBuf { } impl core::ops::Deref for TaprootMerkleBranchBuf { - type Target = [TapNodeHash]; + type Target = TaprootMerkleBranch; #[inline] - fn deref(&self) -> &Self::Target { &self.0 } + fn deref(&self) -> &Self::Target { self.as_ref() } } impl core::ops::DerefMut for TaprootMerkleBranchBuf { #[inline] - fn deref_mut(&mut self) -> &mut Self::Target { &mut self.0 } + fn deref_mut(&mut self) -> &mut Self::Target { self.as_mut() } } impl AsRef<[TapNodeHash]> for TaprootMerkleBranchBuf {