tokio-xmpp: clippy run

skip-changelog

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2025-04-07 22:57:33 +02:00
commit 23c947d081
14 changed files with 54 additions and 73 deletions

View file

@ -57,7 +57,7 @@ pub async fn auth<S: AsyncBufRead + AsyncWrite + Unpin>(
Nonza::Challenge(challenge) => {
let response = mechanism
.response(&challenge.data)
.map_err(|e| AuthError::Sasl(e))?;
.map_err(AuthError::Sasl)?;
// Send response and loop
stream
@ -110,7 +110,6 @@ pub async fn client_auth<C: ServerConnector>(
timeouts: Timeouts,
) -> Result<(StreamFeatures, XmppStream<C::Stream>), Error> {
let username = jid.node().unwrap().as_str();
let password = password;
let (xmpp_stream, channel_binding) = server.connect(&jid, ns::JABBER_CLIENT, timeouts).await?;
let (features, xmpp_stream) = xmpp_stream.recv_features().await?;

View file

@ -137,7 +137,7 @@ impl Client {
/// and yield events.
pub fn new<J: Into<Jid>, P: Into<String>>(jid: J, password: P) -> Self {
let jid = jid.into();
let dns_config = DnsConfig::srv(&jid.domain().to_string(), "_xmpp-client._tcp", 5222);
let dns_config = DnsConfig::srv(jid.domain().as_ref(), "_xmpp-client._tcp", 5222);
Self::new_starttls(jid, password, dns_config, Timeouts::default())
}