tokio-xmpp: Update to the new jid crate
This helps a bit thanks to fewer clones, but otherwise there are very few changes.
This commit is contained in:
parent
c7887efbc7
commit
3c9df12606
5 changed files with 10 additions and 12 deletions
|
|
@ -29,7 +29,7 @@ use crate::{Error, ProtocolError};
|
|||
async fn get_tls_stream<S: AsyncRead + AsyncWrite + Unpin>(
|
||||
xmpp_stream: XMPPStream<S>,
|
||||
) -> Result<TlsStream<S>, Error> {
|
||||
let domain = &xmpp_stream.jid.clone().domain();
|
||||
let domain = xmpp_stream.jid.domain().to_owned();
|
||||
let stream = xmpp_stream.into_inner();
|
||||
let tls_stream = TlsConnector::from(NativeTlsConnector::builder().build().unwrap())
|
||||
.connect(&domain, stream)
|
||||
|
|
@ -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 = &xmpp_stream.jid.clone().domain();
|
||||
let domain = xmpp_stream.jid.domain().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