X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Futil%2Fser_macros.rs;h=6758e36dff551adffc9c58e88cd1977766984001;hb=eff8af21103e43f763cb10ae6a75c1543a2d4068;hp=766d4ee2d78ff90a774049e8cc13d9731b490d18;hpb=c326061108d12f58fde5c4fb7f214fb308275f72;p=rust-lightning diff --git a/lightning/src/util/ser_macros.rs b/lightning/src/util/ser_macros.rs index 766d4ee2..6758e36d 100644 --- a/lightning/src/util/ser_macros.rs +++ b/lightning/src/util/ser_macros.rs @@ -116,8 +116,8 @@ macro_rules! impl_writeable { } } - impl ::util::ser::Readable for $st { - fn read(r: &mut R) -> Result { + impl ::util::ser::Readable for $st { + fn read(r: &mut R) -> Result { Ok(Self { $($field: ::util::ser::Readable::read(r)?),* }) @@ -137,8 +137,8 @@ macro_rules! impl_writeable_len_match { } } - impl Readable for $st { - fn read(r: &mut R) -> Result { + impl ::util::ser::Readable for $st { + fn read(r: &mut R) -> Result { Ok(Self { $($field: Readable::read(r)?),* }) @@ -152,7 +152,7 @@ mod tests { use std::io::{Cursor, Read}; use ln::msgs::DecodeError; use util::ser::{Readable, Writeable, HighZeroBytesDroppedVarInt, VecWriter}; - use secp256k1::PublicKey; + use bitcoin::secp256k1::PublicKey; // The BOLT TLV test cases don't include any tests which use our "required-value" logic since // the encoding layer in the BOLTs has no such concept, though it makes our macros easier to @@ -219,9 +219,9 @@ mod tests { (0xdeadbeef1badbeef, 0x1bad1dea, Some(0x01020304))); } - impl Readable for (PublicKey, u64, u64) { + impl Readable for (PublicKey, u64, u64) { #[inline] - fn read(reader: &mut R) -> Result<(PublicKey, u64, u64), DecodeError> { + fn read(reader: &mut R) -> Result<(PublicKey, u64, u64), DecodeError> { Ok((Readable::read(reader)?, Readable::read(reader)?, Readable::read(reader)?)) } }