diff --git a/Cargo.toml b/Cargo.toml index 09a0343..08ff17c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ repository = "https://github.com/astro/tokio-xmpp" documentation = "https://docs.rs/tokio-xmpp" categories = ["asynchronous", "network-programming"] keywords = ["xmpp", "tokio"] +edition = "2018" [dependencies] futures = "0.1" diff --git a/src/client/auth.rs b/src/client/auth.rs index 55dfe2d..2efb707 100644 --- a/src/client/auth.rs +++ b/src/client/auth.rs @@ -10,10 +10,10 @@ use minidom::Element; use xmpp_parsers::sasl::{Auth, Challenge, Response, Success, Failure, Mechanism as XMPPMechanism}; use try_from::TryFrom; -use xmpp_codec::Packet; -use xmpp_stream::XMPPStream; -use stream_start::StreamStart; -use {Error, AuthError, ProtocolError}; +use crate::xmpp_codec::Packet; +use crate::xmpp_stream::XMPPStream; +use crate::stream_start::StreamStart; +use crate::{Error, AuthError, ProtocolError}; const NS_XMPP_SASL: &str = "urn:ietf:params:xml:ns:xmpp-sasl"; diff --git a/src/client/bind.rs b/src/client/bind.rs index b0268e6..bfcca2b 100644 --- a/src/client/bind.rs +++ b/src/client/bind.rs @@ -5,9 +5,9 @@ use xmpp_parsers::iq::{Iq, IqType}; use xmpp_parsers::bind::Bind; use try_from::TryFrom; -use xmpp_codec::Packet; -use xmpp_stream::XMPPStream; -use {Error, ProtocolError}; +use crate::xmpp_codec::Packet; +use crate::xmpp_stream::XMPPStream; +use crate::{Error, ProtocolError}; const NS_XMPP_BIND: &str = "urn:ietf:params:xml:ns:xmpp-bind"; const BIND_REQ_ID: &str = "resource-bind"; diff --git a/src/component/auth.rs b/src/component/auth.rs index b108ef3..ce55b3a 100644 --- a/src/component/auth.rs +++ b/src/component/auth.rs @@ -3,9 +3,9 @@ use futures::{Future, Poll, Async, sink, Stream}; use tokio_io::{AsyncRead, AsyncWrite}; use xmpp_parsers::component::Handshake; -use xmpp_codec::Packet; -use xmpp_stream::XMPPStream; -use {Error, AuthError}; +use crate::xmpp_codec::Packet; +use crate::xmpp_stream::XMPPStream; +use crate::{Error, AuthError}; const NS_JABBER_COMPONENT_ACCEPT: &str = "jabber:component:accept"; diff --git a/src/happy_eyeballs.rs b/src/happy_eyeballs.rs index 6e7f027..7bdab7e 100644 --- a/src/happy_eyeballs.rs +++ b/src/happy_eyeballs.rs @@ -12,7 +12,7 @@ use trust_dns_resolver::lookup::SrvLookupFuture; use trust_dns_resolver::lookup_ip::LookupIpFuture; use trust_dns_resolver::system_conf; use trust_dns_resolver::config::LookupIpStrategy; -use {Error, ConnecterError}; +use crate::{Error, ConnecterError}; enum State { AwaitResolver(Box + Send>), diff --git a/src/lib.rs b/src/lib.rs index bed95b0..f874315 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -26,13 +26,13 @@ pub mod xmpp_codec; pub mod xmpp_stream; mod stream_start; mod starttls; -pub use starttls::StartTlsClient; +pub use crate::starttls::StartTlsClient; mod happy_eyeballs; mod event; -pub use event::Event; +pub use crate::event::Event; mod client; -pub use client::Client; +pub use crate::client::Client; mod component; -pub use component::Component; +pub use crate::component::Component; mod error; -pub use error::{Error, ProtocolError, AuthError, ConnecterError, ParseError, ParserError}; +pub use crate::error::{Error, ProtocolError, AuthError, ConnecterError, ParseError, ParserError}; diff --git a/src/starttls.rs b/src/starttls.rs index 5acfcb1..a7f7fd3 100644 --- a/src/starttls.rs +++ b/src/starttls.rs @@ -8,9 +8,9 @@ use native_tls::TlsConnector as NativeTlsConnector; use minidom::Element; use jid::Jid; -use xmpp_codec::Packet; -use xmpp_stream::XMPPStream; -use Error; +use crate::xmpp_codec::Packet; +use crate::xmpp_stream::XMPPStream; +use crate::Error; /// XMPP TLS XML namespace pub const NS_XMPP_TLS: &str = "urn:ietf:params:xml:ns:xmpp-tls"; diff --git a/src/stream_start.rs b/src/stream_start.rs index ce9db27..9aef117 100644 --- a/src/stream_start.rs +++ b/src/stream_start.rs @@ -5,9 +5,9 @@ use tokio_codec::Framed; use jid::Jid; use minidom::Element; -use xmpp_codec::{XMPPCodec, Packet}; -use xmpp_stream::XMPPStream; -use {Error, ProtocolError}; +use crate::xmpp_codec::{XMPPCodec, Packet}; +use crate::xmpp_stream::XMPPStream; +use crate::{Error, ProtocolError}; const NS_XMPP_STREAM: &str = "http://etherx.jabber.org/streams"; diff --git a/src/xmpp_codec.rs b/src/xmpp_codec.rs index 37e5a78..4088552 100644 --- a/src/xmpp_codec.rs +++ b/src/xmpp_codec.rs @@ -16,7 +16,7 @@ use xml5ever::tokenizer::{XmlTokenizer, TokenSink, Token, Tag, TagKind}; use xml5ever::interface::Attribute; use bytes::{BytesMut, BufMut}; use quick_xml::Writer as EventWriter; -use {ParserError, ParseError}; +use crate::{ParserError, ParseError}; /// Anything that can be sent or received on an XMPP/XML stream #[derive(Debug)] diff --git a/src/xmpp_stream.rs b/src/xmpp_stream.rs index c5443a9..d8e878d 100644 --- a/src/xmpp_stream.rs +++ b/src/xmpp_stream.rs @@ -7,8 +7,8 @@ use tokio_codec::Framed; use minidom::Element; use jid::Jid; -use xmpp_codec::{XMPPCodec, Packet}; -use stream_start::StreamStart; +use crate::xmpp_codec::{XMPPCodec, Packet}; +use crate::stream_start::StreamStart; /// namespace pub const NS_XMPP_STREAM: &str = "http://etherx.jabber.org/streams";