From 57517692bade538112dfa1d5261e7bcc48e5d7d9 Mon Sep 17 00:00:00 2001 From: Link Mauve Date: Tue, 24 Oct 2023 17:56:53 +0000 Subject: [PATCH] Use jid's domain_str method instead of format!. --- tokio-xmpp/src/starttls.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();