Fixup Result-returning encode method

This commit is contained in:
Alex Crichton
2016-11-22 15:22:30 -08:00
parent e970e9a79c
commit b89150c464
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -28,8 +28,9 @@ impl Codec for LineCodec {
Ok(buf.drain_to(amt))
}
fn encode(&mut self, item: EasyBuf, into: &mut Vec<u8>) {
fn encode(&mut self, item: EasyBuf, into: &mut Vec<u8>) -> io::Result<()> {
into.extend_from_slice(item.as_slice());
Ok(())
}
}