Merge rust-bitcoin/rust-bitcoin#3592: Update generic param
3523b8e117
Rename generic parameter and variable (yancy) Pull request description: Use W for Write closes https://github.com/rust-bitcoin/rust-bitcoin/issues/3590 ACKs for top commit: tcharding: ACK3523b8e117
apoelstra: ACK 3523b8e1171663fc93ab25765271a1070a2d649f; successfully ran local tests Tree-SHA512: 8dd9f38ee07e7652ebd291eb121a2630ebb09ea9ea70873f87e57241f51e5114106517511d1fe07774ec4f42920e9d0619031a1545787631a30422de12421a67
This commit is contained in:
commit
0667a67b7c
|
@ -8,12 +8,12 @@ macro_rules! impl_consensus_encoding {
|
|||
($thing:ident, $($field:ident),+) => (
|
||||
impl $crate::consensus::Encodable for $thing {
|
||||
#[inline]
|
||||
fn consensus_encode<R: $crate::io::Write + ?Sized>(
|
||||
fn consensus_encode<W: $crate::io::Write + ?Sized>(
|
||||
&self,
|
||||
r: &mut R,
|
||||
w: &mut W,
|
||||
) -> core::result::Result<usize, $crate::io::Error> {
|
||||
let mut len = 0;
|
||||
$(len += self.$field.consensus_encode(r)?;)+
|
||||
$(len += self.$field.consensus_encode(w)?;)+
|
||||
Ok(len)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue