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 <pep@bouah.net>
This commit is contained in:
parent
30b049a7d4
commit
21cb5c1f7f
1 changed files with 2 additions and 2 deletions
|
|
@ -79,12 +79,12 @@ async fn main() -> Result<(), Option<()>> {
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
events = client.wait_for_events() => {
|
events = client.wait_for_events() => {
|
||||||
for event in events {
|
for event in events {
|
||||||
let _ = handle_events(&mut client, event, &rooms).await;
|
handle_events(&mut client, event, &rooms).await
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_ = ctrl_c() => {
|
_ = ctrl_c() => {
|
||||||
log::info!("Disconnecting...");
|
log::info!("Disconnecting...");
|
||||||
let _ = client.disconnect().await;
|
let _: Result<_, _> = client.disconnect().await;
|
||||||
break;
|
break;
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue