tokio-xmpp: Bump tokio-util

This commit is contained in:
Emmanuel Gil Peyrot 2020-06-22 01:32:01 +02:00 committed by Link Mauve
commit 3db9eeae2f
2 changed files with 3 additions and 4 deletions

View file

@ -272,11 +272,10 @@ impl Decoder for XMPPCodec {
}
}
impl Encoder for XMPPCodec {
type Item = Packet;
impl Encoder<Packet> for XMPPCodec {
type Error = io::Error;
fn encode(&mut self, item: Self::Item, dst: &mut BytesMut) -> Result<(), Self::Error> {
fn encode(&mut self, item: Packet, dst: &mut BytesMut) -> Result<(), Self::Error> {
let remaining = dst.capacity() - dst.len();
let max_stanza_size: usize = 2usize.pow(16);
if remaining < max_stanza_size {