From c56dbe89033e6cb7c0534075c30b691d3729a76e Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Wed, 25 Oct 2023 00:16:28 +0200 Subject: [PATCH] tokio-xmpp: Remove unneeded clones --- tokio-xmpp/src/client/simple_client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tokio-xmpp/src/client/simple_client.rs b/tokio-xmpp/src/client/simple_client.rs index 7fde073d..2eef62fb 100644 --- a/tokio-xmpp/src/client/simple_client.rs +++ b/tokio-xmpp/src/client/simple_client.rs @@ -40,7 +40,7 @@ impl Client { /// Start a new client given that the JID is already parsed. pub async fn new_with_jid(jid: Jid, password: String) -> Result { - let stream = Self::connect(jid.clone(), password.clone()).await?; + let stream = Self::connect(jid, password).await?; Ok(Client { stream }) } @@ -52,7 +52,7 @@ impl Client { async fn connect(jid: Jid, password: String) -> Result { let username = jid.node_str().unwrap(); let password = password; - let domain = idna::domain_to_ascii(&jid.clone().domain_str()).map_err(|_| Error::Idna)?; + let domain = idna::domain_to_ascii(jid.domain_str()).map_err(|_| Error::Idna)?; // TCP connection let tcp_stream = connect_with_srv(&domain, "_xmpp-client._tcp", 5222).await?;