diff options
Diffstat (limited to 'jabber/src/jabber_stream.rs')
-rw-r--r-- | jabber/src/jabber_stream.rs | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/jabber/src/jabber_stream.rs b/jabber/src/jabber_stream.rs index c38f930..6fa92b5 100644 --- a/jabber/src/jabber_stream.rs +++ b/jabber/src/jabber_stream.rs @@ -1,10 +1,8 @@ -use std::pin::pin; use std::str::{self, FromStr}; use std::sync::Arc; -use futures::{sink, stream, StreamExt}; use jid::JID; -use peanuts::element::{FromContent, IntoElement}; +use peanuts::element::IntoElement; use peanuts::{Reader, Writer}; use rsasl::prelude::{Mechname, SASLClient, SASLConfig}; use stanza::bind::{Bind, BindType, FullJidType, ResourceType}; @@ -141,7 +139,7 @@ where let mut session = sasl.start_suggested(&offered_mechs)?; let selected_mechanism = session.get_mechname().as_str().to_owned(); debug!("selected mech: {:?}", selected_mechanism); - let mut data: Option<Vec<u8>> = None; + let mut data: Option<Vec<u8>>; if !session.are_we_first() { // if not first mention the mechanism then get challenge data @@ -409,13 +407,7 @@ impl std::fmt::Debug for JabberStream<Unencrypted> { #[cfg(test)] mod tests { - use std::time::Duration; - - use super::*; - use crate::connection::Connection; - use futures::sink; use test_log::test; - use tokio::time::sleep; #[test(tokio::test)] async fn start_stream() { |