diff --git a/tokio-xmpp/src/starttls.rs b/tokio-xmpp/src/starttls.rs index 77d0c8aa..c27caf0a 100644 --- a/tokio-xmpp/src/starttls.rs +++ b/tokio-xmpp/src/starttls.rs @@ -41,7 +41,7 @@ async fn get_tls_stream( async fn get_tls_stream( xmpp_stream: XMPPStream, ) -> Result, Error> { - let domain = format!("{}", xmpp_stream.jid.domain().to_owned()); + let domain = xmpp_stream.jid.domain_str().to_owned(); let domain = ServerName::try_from(domain.as_str())?; let stream = xmpp_stream.into_inner(); let mut root_store = RootCertStore::empty();