X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=rust-lightning;a=blobdiff_plain;f=lightning%2Fsrc%2Frouting%2Frouter.rs;h=1d4234d9db4f0f6154d801d06f90f892d7f21730;hp=eda25572a22710d3df0220c411514b35a844deee;hb=0dfcacd22c23f69b6526c9c6507d21427a2b7ccb;hpb=bee9a1e4030e04a91a2d774784a2e2fc545ae797 diff --git a/lightning/src/routing/router.rs b/lightning/src/routing/router.rs index eda25572..1d4234d9 100644 --- a/lightning/src/routing/router.rs +++ b/lightning/src/routing/router.rs @@ -21,6 +21,7 @@ use routing::network_graph::{NetworkGraph, RoutingFees}; use util::ser::{Writeable, Readable}; use util::logger::Logger; +use io; use prelude::*; use alloc::collections::BinaryHeap; use core::cmp; @@ -74,7 +75,7 @@ const SERIALIZATION_VERSION: u8 = 1; const MIN_SERIALIZATION_VERSION: u8 = 1; impl Writeable for Route { - fn write(&self, writer: &mut W) -> Result<(), ::std::io::Error> { + fn write(&self, writer: &mut W) -> Result<(), io::Error> { write_ver_prefix!(writer, SERIALIZATION_VERSION, MIN_SERIALIZATION_VERSION); (self.paths.len() as u64).write(writer)?; for hops in self.paths.iter() { @@ -89,7 +90,7 @@ impl Writeable for Route { } impl Readable for Route { - fn read(reader: &mut R) -> Result { + fn read(reader: &mut R) -> Result { let _ver = read_ver_prefix!(reader, SERIALIZATION_VERSION); let path_count: u64 = Readable::read(reader)?; let mut paths = Vec::with_capacity(cmp::min(path_count, 128) as usize);