tokio-xmpp: Bump tokio-util
This commit is contained in:
parent
db86aa9d5a
commit
3db9eeae2f
2 changed files with 3 additions and 4 deletions
|
@ -19,7 +19,7 @@ log = "0.4"
|
||||||
native-tls = "0.2"
|
native-tls = "0.2"
|
||||||
sasl = "0.4"
|
sasl = "0.4"
|
||||||
tokio = { version = "0.2", features = ["net", "stream", "rt-util", "rt-threaded", "macros"] }
|
tokio = { version = "0.2", features = ["net", "stream", "rt-util", "rt-threaded", "macros"] }
|
||||||
tokio-util = { version = "0.2", features = ["codec"] }
|
tokio-util = { version = "0.3", features = ["codec"] }
|
||||||
tokio-tls = "0.3"
|
tokio-tls = "0.3"
|
||||||
trust-dns-resolver = "0.19"
|
trust-dns-resolver = "0.19"
|
||||||
trust-dns-proto = "0.19"
|
trust-dns-proto = "0.19"
|
||||||
|
|
|
@ -272,11 +272,10 @@ impl Decoder for XMPPCodec {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Encoder for XMPPCodec {
|
impl Encoder<Packet> for XMPPCodec {
|
||||||
type Item = Packet;
|
|
||||||
type Error = io::Error;
|
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 remaining = dst.capacity() - dst.len();
|
||||||
let max_stanza_size: usize = 2usize.pow(16);
|
let max_stanza_size: usize = 2usize.pow(16);
|
||||||
if remaining < max_stanza_size {
|
if remaining < max_stanza_size {
|
||||||
|
|
Loading…
Reference in a new issue