From 21cb5c1f7f367eca4d2d7295380b2862f9eebaa8 Mon Sep 17 00:00:00 2001 From: pep Date: Wed, 29 Oct 2025 13:06:47 +0100 Subject: [PATCH] xmpp/example: explicit types to prevent mishap Previously there was a forgotten `.await` at this exact place because of the `let _`, which could have been `let _: type` to prevent this. The `handle_events` method here returns the unit type so I just removed it. skip-changelog: already in the changelog and not released yet Signed-off-by: pep --- xmpp/examples/hello_bot.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xmpp/examples/hello_bot.rs b/xmpp/examples/hello_bot.rs index eaaf16e9a429bf3154c9ea287bd0cdf38af4cfab..877fabd70c3336268f36ae663652fe980668078c 100644 --- a/xmpp/examples/hello_bot.rs +++ b/xmpp/examples/hello_bot.rs @@ -79,12 +79,12 @@ async fn main() -> Result<(), Option<()>> { tokio::select! { events = client.wait_for_events() => { for event in events { - let _ = handle_events(&mut client, event, &rooms).await; + handle_events(&mut client, event, &rooms).await } }, _ = ctrl_c() => { log::info!("Disconnecting..."); - let _ = client.disconnect().await; + let _: Result<_, _> = client.disconnect().await; break; }, }