Use io::Result

This commit is contained in:
sinkuu
2017-01-04 17:47:20 +09:00
parent 717e99ca80
commit 5929a59aca
+1 -1
View File
@@ -233,7 +233,7 @@ pub trait Codec {
/// Finally, if the bytes in the buffer are malformed then an error is
/// returned indicating why. This informs `Framed` that the stream is now
/// corrupt and should be terminated.
fn decode(&mut self, buf: &mut EasyBuf) -> Result<Option<Self::In>, io::Error>;
fn decode(&mut self, buf: &mut EasyBuf) -> io::Result<Option<Self::In>>;
/// A default method available to be called when there are no more bytes
/// available to be read from the underlying I/O.