diff --git a/README.md b/README.md index c3b636a02cd135b1efd309efdc4564b84a0c6c12..52e43abd48e3b0c2092fc39398ce4740a092d399 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,9 @@ # TODO - [ ] minidom ns +- [ ] replace debug output with log crate - [ ] customize tls verify? - [ ] Error type - [ ] unexpected event errors -- [ ] doc +- [x] doc - [ ] tests diff --git a/src/client/auth.rs b/src/client/auth.rs index 916b1ddce1a6d972933f3cf30e325791df5f6341..0dc66d1654455c29bf20e5ab0857d020fecdd324 100644 --- a/src/client/auth.rs +++ b/src/client/auth.rs @@ -47,12 +47,12 @@ impl ClientAuth { .map(|mech_el| mech_el.text()) .collect(), }; - println!("SASL mechanisms offered: {:?}", mech_names); + // println!("SASL mechanisms offered: {:?}", mech_names); for mut mech in mechs { let name = mech.name().to_owned(); if mech_names.iter().any(|name1| *name1 == name) { - println!("SASL mechanism selected: {:?}", name); + // println!("SASL mechanism selected: {:?}", name); let initial = mech.initial()?; let mut this = ClientAuth { state: ClientAuthState::Invalid, @@ -120,8 +120,8 @@ impl Future for ClientAuth { Ok(Async::NotReady) } } - Ok(Async::Ready(event)) => { - println!("ClientAuth ignore {:?}", event); + Ok(Async::Ready(_event)) => { + // println!("ClientAuth ignore {:?}", _event); Ok(Async::NotReady) }, Ok(_) => { diff --git a/src/client/mod.rs b/src/client/mod.rs index 4f633ebad14d753c0394e79ca5f4581b6683e2c5..44dc8d0c34dd488fb066c38f8bfba965b2488008 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -87,7 +87,7 @@ impl Client { }).and_then(|xmpp_stream| { Self::bind(xmpp_stream) }).and_then(|xmpp_stream| { - println!("Bound to {}", xmpp_stream.jid); + // println!("Bound to {}", xmpp_stream.jid); Ok(xmpp_stream) }) ) diff --git a/src/component/mod.rs b/src/component/mod.rs index 9536f0a8f1485a1e67ec097ea516d718046860fd..bf9a005f24ce2bf3873edcab11304d83e030cecc 100644 --- a/src/component/mod.rs +++ b/src/component/mod.rs @@ -63,7 +63,7 @@ impl Component { }).and_then(move |xmpp_stream| { Self::auth(xmpp_stream, password).expect("auth") }).and_then(|xmpp_stream| { - println!("Bound to {}", xmpp_stream.jid); + // println!("Bound to {}", xmpp_stream.jid); Ok(xmpp_stream) }) ) diff --git a/src/happy_eyeballs.rs b/src/happy_eyeballs.rs index 2d83301c7ecc36b071b0a21b0ca5af4cafb4cf23..7b95f8232402aa51a486aa83d312215af521160b 100644 --- a/src/happy_eyeballs.rs +++ b/src/happy_eyeballs.rs @@ -65,7 +65,7 @@ impl Future for Connecter { for addr in srv_item.to_socket_addrs() { self.connects.entry(addr) .or_insert_with(|| { - println!("Connect to {}", addr); + // println!("Connect to {}", addr); TcpStream::connect(&addr, handle) }); } @@ -87,8 +87,8 @@ impl Future for Connecter { connected_stream = Some(tcp_stream); false }, - Err(e) => { - println!("{}", e); + Err(_e) => { + // println!("{}", _e); false }, } diff --git a/src/xmpp_codec.rs b/src/xmpp_codec.rs index ededf214138481f9ab9c071aadd49b500dfe4ff2..7215563ff9854b22f4814caa28e5cdbaaeda7bf8 100644 --- a/src/xmpp_codec.rs +++ b/src/xmpp_codec.rs @@ -163,7 +163,7 @@ impl TokenSink for ParserSink { Token::EOFToken => self.push_queue(Packet::StreamEnd), Token::ParseError(s) => { - println!("ParseError: {:?}", s); + // println!("ParseError: {:?}", s); self.push_queue(Packet::Error(Box::new(Error::new(ErrorKind::InvalidInput, (*s).to_owned())))) }, _ => (), @@ -226,7 +226,7 @@ impl Decoder for XMPPCodec { match from_utf8(buf1) { Ok(s) => { if ! s.is_empty() { - println!("<< {}", s); + // println!("<< {}", s); let tendril = FromIterator::from_iter(s.chars()); self.parser.feed(tendril); } @@ -246,7 +246,7 @@ impl Decoder for XMPPCodec { return result; }, Err(e) => { - println!("error {} at {}/{} in {:?}", e, e.valid_up_to(), buf1.len(), buf1); + // println!("error {} at {}/{} in {:?}", e, e.valid_up_to(), buf1.len(), buf1); return Err(Error::new(ErrorKind::InvalidInput, e)); }, } @@ -291,7 +291,7 @@ impl Encoder for XMPPCodec { Packet::Stanza(stanza) => { stanza.write_to_inner(&mut EventWriter::new(WriteBytes::new(dst))) .and_then(|_| { - println!(">> {:?}", dst); + // println!(">> {:?}", dst); Ok(()) }) .map_err(|e| Error::new(ErrorKind::InvalidInput, format!("{}", e))) @@ -299,7 +299,7 @@ impl Encoder for XMPPCodec { Packet::Text(text) => { write_text(&text, dst) .and_then(|_| { - println!(">> {:?}", dst); + // println!(">> {:?}", dst); Ok(()) }) .map_err(|e| Error::new(ErrorKind::InvalidInput, format!("{}", e)))