codec: change Encoder to take &Item (#1746)

Co-authored-by: Markus Westerlind <[email protected]>
This commit is contained in:
Lucio Franco
2020-03-04 15:54:41 -05:00
committed by GitHub
co-authored by Markus Westerlind
parent 1eb6131321
commit 9d4d076189
19 changed files with 59 additions and 55 deletions
+1 -2
View File
@@ -65,8 +65,7 @@ impl Decoder for BytesCodec {
}
}
impl Encoder for BytesCodec {
type Item = Bytes;
impl Encoder<Bytes> for BytesCodec {
type Error = io::Error;
fn encode(&mut self, data: Bytes, buf: &mut BytesMut) -> Result<(), io::Error> {