Changed LineCodec to use extend in encode (fixes #92).

This commit is contained in:
Aaron Weiss 2017-06-27 14:57:25 -07:00
parent 49e02f5a67
commit 07614fb26f
No known key found for this signature in database
GPG key ID: 0237035D9BF03AE2

View file

@ -2,7 +2,7 @@
use std::io;
use bytes::{BufMut, BytesMut};
use bytes::BytesMut;
use encoding::{DecoderTrap, EncoderTrap, EncodingRef};
use encoding::label::encoding_from_whatwg_label;
use tokio_io::codec::{Decoder, Encoder};
@ -69,7 +69,7 @@ impl Encoder for LineCodec {
});
// Write the encoded message to the output buffer.
dst.put(&data?);
dst.extend(&data?);
Ok(())
}