Make Readable::read a templated on the stream, not Readable itself
[rust-lightning] / lightning / src / ln / wire.rs
index c1a596b0c6c36397c2f068b6b82c843b721ec3f5..dfd11fc7e571760fca83d1364f679e986dc04b60 100644 (file)
@@ -106,7 +106,7 @@ impl ::std::fmt::Display for MessageType {
 ///
 /// Returns an error if the message payload code not be decoded as the specified type.
 pub fn read<R: ::std::io::Read>(buffer: &mut R) -> Result<Message, msgs::DecodeError> {
-       let message_type = <u16 as Readable<R>>::read(buffer)?;
+       let message_type = <u16 as Readable>::read(buffer)?;
        match message_type {
                msgs::Init::TYPE => {
                        Ok(Message::Init(Readable::read(buffer)?))