Lazily bubbling the XMPP event up to the Disconnected event.

This commit is contained in:
Werner Kroneman 2023-12-11 13:48:39 +01:00 committed by pep
commit ba48f6de46
2 changed files with 6 additions and 6 deletions

View file

@ -39,8 +39,8 @@ async fn main() -> Result<(), Option<()>> {
Event::Online => {
println!("Online.");
}
Event::Disconnected => {
println!("Disconnected");
Event::Disconnected(e) => {
println!("Disconnected because of {}.", e);
return Err(None);
}
Event::ContactAdded(contact) => {