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:
Emmanuel Gil Peyrot 2023-06-20 14:35:28 +02:00
commit 3c9df12606
5 changed files with 10 additions and 12 deletions

View file

@ -109,13 +109,13 @@ impl Client {
jid: Jid,
password: String,
) -> Result<XMPPStream, Error> {
let username = jid.clone().node().unwrap();
let username = jid.node().unwrap();
let password = password;
// TCP connection
let tcp_stream = match server {
ServerConfig::UseSrv => {
connect_with_srv(&jid.clone().domain(), "_xmpp-client._tcp", 5222).await?
connect_with_srv(jid.domain(), "_xmpp-client._tcp", 5222).await?
}
ServerConfig::Manual { host, port } => connect_to_host(host.as_str(), port).await?,
};