mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-08 00:00:13 +02:00
Fixup Result-returning encode method
This commit is contained in:
@@ -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(())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user