mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-23 00:00:10 +02:00
codec: change Encoder to take &Item (#1746)
Co-authored-by: Markus Westerlind <[email protected]>
This commit is contained in:
co-authored by
Markus Westerlind
parent
1eb6131321
commit
9d4d076189
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user