X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=lightning%2Fsrc%2Futil%2Fevents.rs;h=74490eb348b6f78eff96088b4db81b24ce1432ad;hb=0dfcacd22c23f69b6526c9c6507d21427a2b7ccb;hp=876dfe6abb551f359a6c67c60fe05c1d104b81ed;hpb=bee9a1e4030e04a91a2d774784a2e2fc545ae797;p=rust-lightning diff --git a/lightning/src/util/events.rs b/lightning/src/util/events.rs index 876dfe6a..74490eb3 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; @@ -153,7 +154,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)?; @@ -222,7 +223,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 => {