diff --git a/bitcoin/src/crypto/sighash.rs b/bitcoin/src/crypto/sighash.rs index c865d8bc..db6e380a 100644 --- a/bitcoin/src/crypto/sighash.rs +++ b/bitcoin/src/crypto/sighash.rs @@ -673,9 +673,9 @@ impl> SighashCache { /// Encodes the BIP341 signing data for any flag type into a given object implementing the /// [`io::Write`] trait. - pub fn taproot_encode_signing_data_to>( + pub fn taproot_encode_signing_data_to>( &mut self, - writer: &mut Write, + writer: &mut W, input_index: usize, prevouts: &Prevouts, annex: Option, @@ -860,9 +860,9 @@ impl> SighashCache { /// `script_code` is dependent on the type of the spend transaction. For p2wpkh use /// [`Script::p2wpkh_script_code`], for p2wsh just pass in the witness script. (Also see /// [`Self::p2wpkh_signature_hash`] and [`SighashCache::p2wsh_signature_hash`].) - pub fn segwit_v0_encode_signing_data_to( + pub fn segwit_v0_encode_signing_data_to( &mut self, - writer: &mut Write, + writer: &mut W, input_index: usize, script_code: &Script, value: Amount, @@ -984,9 +984,9 @@ impl> SighashCache { /// /// This function can't handle the SIGHASH_SINGLE bug internally, so it returns [`EncodeSigningDataResult`] /// that must be handled by the caller (see [`EncodeSigningDataResult::is_sighash_single_bug`]). - pub fn legacy_encode_signing_data_to>( + pub fn legacy_encode_signing_data_to>( &self, - writer: &mut Write, + writer: &mut W, input_index: usize, script_pubkey: &Script, sighash_type: U, @@ -1011,9 +1011,9 @@ impl> SighashCache { return EncodeSigningDataResult::SighashSingleBug; } - fn encode_signing_data_to_inner( + fn encode_signing_data_to_inner( self_: &Transaction, - writer: &mut Write, + writer: &mut W, input_index: usize, script_pubkey: &Script, sighash_type: u32, diff --git a/bitcoin/src/taproot/mod.rs b/bitcoin/src/taproot/mod.rs index 6dcb0ff1..4532a031 100644 --- a/bitcoin/src/taproot/mod.rs +++ b/bitcoin/src/taproot/mod.rs @@ -1109,7 +1109,7 @@ impl ControlBlock { /// # Returns /// /// The number of bytes written to the writer. - pub fn encode(&self, writer: &mut Write) -> io::Result { + pub fn encode(&self, writer: &mut W) -> io::Result { let first_byte: u8 = i32::from(self.output_key_parity) as u8 | self.leaf_version.to_consensus(); writer.write_all(&[first_byte])?;