diff --git a/src/client/auth.rs b/src/client/auth.rs index a366b2ff..dce2f86c 100644 --- a/src/client/auth.rs +++ b/src/client/auth.rs @@ -1,17 +1,16 @@ use std::mem::replace; -use futures::*; -use futures::sink; +use futures::{Future, Poll, Async, sink, Sink, Stream}; use tokio_io::{AsyncRead, AsyncWrite}; use minidom::Element; use sasl::common::Credentials; -use sasl::common::scram::*; +use sasl::common::scram::{Sha1, Sha256}; use sasl::client::Mechanism; -use sasl::client::mechanisms::*; +use sasl::client::mechanisms::{Scram, Plain, Anonymous}; use serialize::base64::{self, ToBase64, FromBase64}; -use xmpp_codec::*; -use xmpp_stream::*; -use stream_start::*; +use xmpp_codec::Packet; +use xmpp_stream::XMPPStream; +use stream_start::StreamStart; 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 6a59503c..7800bbcc 100644 --- a/src/client/bind.rs +++ b/src/client/bind.rs @@ -1,14 +1,13 @@ use std::mem::replace; use std::error::Error; use std::str::FromStr; -use futures::*; -use futures::sink; +use futures::{Future, Poll, Async, sink, Sink, Stream}; use tokio_io::{AsyncRead, AsyncWrite}; use jid::Jid; use minidom::Element; -use xmpp_codec::*; -use xmpp_stream::*; +use xmpp_codec::Packet; +use xmpp_stream::XMPPStream; const NS_XMPP_BIND: &str = "urn:ietf:params:xml:ns:xmpp-bind"; const BIND_REQ_ID: &str = "resource-bind"; diff --git a/src/client/mod.rs b/src/client/mod.rs index de0bdb66..a45cede8 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -5,7 +5,7 @@ use tokio_core::reactor::Handle; use tokio_core::net::TcpStream; use tokio_io::{AsyncRead, AsyncWrite}; use tokio_tls::TlsStream; -use futures::*; +use futures::{Future, Stream, Poll, Async, Sink, StartSend, AsyncSink}; use minidom::Element; use jid::{Jid, JidParseError}; use sasl::common::{Credentials, ChannelBinding}; @@ -17,9 +17,9 @@ use super::starttls::{NS_XMPP_TLS, StartTlsClient}; use super::happy_eyeballs::Connecter; mod auth; -use self::auth::*; +use self::auth::ClientAuth; mod bind; -use self::bind::*; +use self::bind::ClientBind; mod event; pub use self::event::Event as ClientEvent; diff --git a/src/happy_eyeballs.rs b/src/happy_eyeballs.rs index 039007bf..f529a87a 100644 --- a/src/happy_eyeballs.rs +++ b/src/happy_eyeballs.rs @@ -1,11 +1,11 @@ use std::str::FromStr; use std::collections::HashMap; use std::net::SocketAddr; -use futures::*; +use futures::{Future, Poll, Async, Stream}; use tokio_core::reactor::Handle; use tokio_core::net::{TcpStream, TcpStreamNew}; use domain::resolv::Resolver; -use domain::resolv::lookup::srv::*; +use domain::resolv::lookup::srv::{lookup_srv, LookupSrv, LookupSrvStream}; use domain::bits::DNameBuf; pub struct Connecter { diff --git a/src/lib.rs b/src/lib.rs index c150760d..0cea1db2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -17,9 +17,9 @@ pub mod xmpp_codec; pub mod xmpp_stream; mod stream_start; mod tcp; -pub use tcp::*; +pub use tcp::TcpClient; mod starttls; -pub use starttls::*; +pub use starttls::StartTlsClient; mod happy_eyeballs; mod client; pub use client::{Client, ClientEvent}; diff --git a/src/starttls.rs b/src/starttls.rs index fe6c6410..91a7ea26 100644 --- a/src/starttls.rs +++ b/src/starttls.rs @@ -3,13 +3,13 @@ use futures::{Future, Sink, Poll, Async}; use futures::stream::Stream; use futures::sink; use tokio_io::{AsyncRead, AsyncWrite}; -use tokio_tls::*; +use tokio_tls::{TlsStream, TlsConnectorExt, ConnectAsync}; use native_tls::TlsConnector; use minidom::Element; use jid::Jid; -use xmpp_codec::*; -use xmpp_stream::*; +use xmpp_codec::Packet; +use xmpp_stream::XMPPStream; use stream_start::StreamStart; diff --git a/src/stream_start.rs b/src/stream_start.rs index bbccadd1..0b4fd9e7 100644 --- a/src/stream_start.rs +++ b/src/stream_start.rs @@ -1,13 +1,13 @@ use std::mem::replace; use std::io::{Error, ErrorKind}; use std::collections::HashMap; -use futures::*; +use futures::{Future, Async, Poll, Stream, sink, Sink}; use tokio_io::{AsyncRead, AsyncWrite}; use tokio_io::codec::Framed; use jid::Jid; -use xmpp_codec::*; -use xmpp_stream::*; +use xmpp_codec::{XMPPCodec, Packet}; +use xmpp_stream::XMPPStream; const NS_XMPP_STREAM: &str = "http://etherx.jabber.org/streams"; diff --git a/src/tcp.rs b/src/tcp.rs index 06aa7b83..156fa4f5 100644 --- a/src/tcp.rs +++ b/src/tcp.rs @@ -5,7 +5,7 @@ use tokio_core::reactor::Handle; use tokio_core::net::{TcpStream, TcpStreamNew}; use jid::Jid; -use xmpp_stream::*; +use xmpp_stream::XMPPStream; use stream_start::StreamStart; pub struct TcpClient { diff --git a/src/xmpp_codec.rs b/src/xmpp_codec.rs index e6d26045..7504dfff 100644 --- a/src/xmpp_codec.rs +++ b/src/xmpp_codec.rs @@ -12,7 +12,7 @@ use tokio_io::codec::{Encoder, Decoder}; use minidom::{Element, Node}; use xml5ever::tokenizer::{XmlTokenizer, TokenSink, Token, Tag, TagKind}; use xml5ever::interface::Attribute; -use bytes::*; +use bytes::{BytesMut, BufMut}; // const NS_XMLNS: &'static str = "http://www.w3.org/2000/xmlns/"; diff --git a/src/xmpp_stream.rs b/src/xmpp_stream.rs index 932cbcef..9ff6916f 100644 --- a/src/xmpp_stream.rs +++ b/src/xmpp_stream.rs @@ -1,12 +1,12 @@ use std::collections::HashMap; -use futures::*; +use futures::{Poll, Stream, Sink, StartSend}; use tokio_io::{AsyncRead, AsyncWrite}; use tokio_io::codec::Framed; use minidom::Element; use jid::Jid; -use xmpp_codec::*; -use stream_start::*; +use xmpp_codec::XMPPCodec; +use stream_start::StreamStart; pub const NS_XMPP_STREAM: &str = "http://etherx.jabber.org/streams";