Add generic serialization implementations for Boxs and 3-tuples
[rust-lightning] / lightning / src / util / ser_macros.rs
index 44bd9ec49729fc1ecb4351c00e086beaf07d9df1..78c3b80962e7a890264b7796710518115381bc59 100644 (file)
@@ -523,7 +523,7 @@ macro_rules! impl_writeable_tlv_based_enum {
 #[cfg(test)]
 mod tests {
        use prelude::*;
-       use std::io::{Cursor, Read};
+       use std::io::Cursor;
        use ln::msgs::DecodeError;
        use util::ser::{Readable, Writeable, HighZeroBytesDroppedVarInt, VecWriter};
        use bitcoin::secp256k1::PublicKey;
@@ -593,13 +593,6 @@ mod tests {
                        (0xdeadbeef1badbeef, 0x1bad1dea, Some(0x01020304)));
        }
 
-       impl Readable for (PublicKey, u64, u64) {
-               #[inline]
-               fn read<R: Read>(reader: &mut R) -> Result<(PublicKey, u64, u64), DecodeError> {
-                       Ok((Readable::read(reader)?, Readable::read(reader)?, Readable::read(reader)?))
-               }
-       }
-
        // BOLT TLV test cases
        fn tlv_reader_n1(s: &[u8]) -> Result<(Option<HighZeroBytesDroppedVarInt<u64>>, Option<u64>, Option<(PublicKey, u64, u64)>, Option<u16>), DecodeError> {
                let mut s = Cursor::new(s);