X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fpeer.rs;h=8e1c5e9eddb37ab768cae3f1c14ed4c87530f868;hb=9640749bafef6edbe18540c2ce4bc1d5bea80a17;hp=0d0fc3f9689be897d89b1d422c14cd269b30beff;hpb=a95c8b1e0aeea6a14f193599c6fdb8e0e1d60f60;p=dnsseed-rust
diff --git a/src/peer.rs b/src/peer.rs
index 0d0fc3f..8e1c5e9 100644
--- a/src/peer.rs
+++ b/src/peer.rs
@@ -18,7 +18,6 @@ use tokio::timer::Delay;
use futures::sync::mpsc;
use crate::printer::Printer;
-use crate::timeout_stream::TimeoutStream;
struct BytesCoder<'a>(&'a mut bytes::BytesMut);
impl<'a> std::io::Write for BytesCoder<'a> {
@@ -46,9 +45,9 @@ impl<'a> std::io::Read for BytesDecoder<'a> {
struct MsgCoder<'a>(&'a Printer);
impl<'a> codec::Decoder for MsgCoder<'a> {
type Item = NetworkMessage;
- type Error = std::io::Error;
+ type Error = encode::Error;
- fn decode(&mut self, bytes: &mut bytes::BytesMut) -> Result