Merge pull request #139 from sinkuu/use_io_result

Use `io::Result`
This commit is contained in:
Alex Crichton
2017-01-04 08:42:10 -08:00
committed by GitHub
+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.