xmpp::Agent::wait_for_events cannot error

This commit is contained in:
xmppftw xmppftw 2024-08-08 15:14:57 +02:00
commit 23e943825f
6 changed files with 18 additions and 22 deletions

View file

@ -33,8 +33,8 @@ async fn main() -> Result<(), Option<()>> {
.enable_feature(ClientFeature::JoinRooms)
.build();
while let Some(events) = client.wait_for_events().await {
for event in events {
loop {
for event in client.wait_for_events().await {
match event {
Event::Online => {
println!("Online.");
@ -95,6 +95,4 @@ async fn main() -> Result<(), Option<()>> {
}
}
}
Ok(())
}