X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Futil%2Fevents.rs;h=1780483cb8b9e01bcab8d5f0c18e812522d27a7f;hb=69ee4860848d5992b238eca3343141004d9d1572;hp=34b0b331e9e45d3512c6b65b41fd146904e735b0;hpb=50f47ecc05b5ade369872a8b3580301bdd977a83;p=rust-lightning diff --git a/lightning/src/util/events.rs b/lightning/src/util/events.rs index 34b0b331..1780483c 100644 --- a/lightning/src/util/events.rs +++ b/lightning/src/util/events.rs @@ -23,6 +23,7 @@ use bitcoin::blockdata::script::Script; use bitcoin::secp256k1::key::PublicKey; +use io; use prelude::*; use core::time::Duration; use core::ops::Deref; @@ -174,7 +175,7 @@ pub enum Event { } impl Writeable for Event { - fn write(&self, writer: &mut W) -> Result<(), ::std::io::Error> { + fn write(&self, writer: &mut W) -> Result<(), io::Error> { match self { &Event::FundingGenerationReady { .. } => { 0u8.write(writer)?; @@ -250,7 +251,7 @@ impl Writeable for Event { } } impl MaybeReadable for Event { - fn read(reader: &mut R) -> Result, msgs::DecodeError> { + fn read(reader: &mut R) -> Result, msgs::DecodeError> { match Readable::read(reader)? { 0u8 => Ok(None), 1u8 => {