Use jid's domain_str method instead of format!.
This commit is contained in:
parent
34b50d32c9
commit
57517692ba
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ async fn get_tls_stream<S: AsyncRead + AsyncWrite + Unpin>(
|
|||
async fn get_tls_stream<S: AsyncRead + AsyncWrite + Unpin>(
|
||||
xmpp_stream: XMPPStream<S>,
|
||||
) -> Result<TlsStream<S>, 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();
|
||||
|
|
Loading…
Reference in a new issue