Add `as_mut_slice` to `TaprootMerkleBranchBuf`
`TaprootMerkleBranchBuf` already had `as_slice` method and `DerefMut` but was missing `as_slice_mut`, so this change adds it.
This commit is contained in:
parent
33d75659da
commit
370c2597c6
|
@ -27,6 +27,10 @@ impl TaprootMerkleBranchBuf {
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn as_slice(&self) -> &[TapNodeHash] { &self.0 }
|
pub fn as_slice(&self) -> &[TapNodeHash] { &self.0 }
|
||||||
|
|
||||||
|
/// Returns a mutable reference to the slice of hashes.
|
||||||
|
#[inline]
|
||||||
|
pub fn as_mut_slice(&mut self) -> &mut [TapNodeHash] { &mut self.0 }
|
||||||
|
|
||||||
/// Returns the number of nodes in this Merkle proof.
|
/// Returns the number of nodes in this Merkle proof.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn len(&self) -> usize { self.0.len() }
|
pub fn len(&self) -> usize { self.0.len() }
|
||||||
|
|
Loading…
Reference in New Issue