use tokio-codec

This commit is contained in:
Astro 2018-07-31 23:34:04 +02:00
commit 1a3707649e
5 changed files with 7 additions and 5 deletions

View file

@ -1,6 +1,6 @@
use futures::{Poll, Stream, Sink, StartSend};
use tokio_io::{AsyncRead, AsyncWrite};
use tokio_io::codec::Framed;
use tokio_codec::Framed;
use minidom::Element;
use jid::Jid;
@ -25,7 +25,7 @@ impl<S: AsyncRead + AsyncWrite> XMPPStream<S> {
}
pub fn start(stream: S, jid: Jid, ns: String) -> StreamStart<S> {
let xmpp_stream = AsyncRead::framed(stream, XMPPCodec::new());
let xmpp_stream = Framed::new(stream, XMPPCodec::new());
StreamStart::from_stream(xmpp_stream, jid, ns)
}