xmpp::Agent::wait_for_events cannot error
This commit is contained in:
parent
2fc8e1c1dd
commit
23e943825f
6 changed files with 18 additions and 22 deletions
|
|
@ -85,13 +85,8 @@ impl<C: ServerConnector> Agent<C> {
|
|||
muc::private_message::send_room_private_message(self, room, recipient, lang, text).await
|
||||
}
|
||||
|
||||
/// Wait for new events.
|
||||
///
|
||||
/// # Returns
|
||||
///
|
||||
/// - `Some(events)` if there are new events; multiple may be returned at once.
|
||||
/// - `None` if the underlying stream is closed.
|
||||
pub async fn wait_for_events(&mut self) -> Option<Vec<Event>> {
|
||||
/// Wait for new events, or Error::Disconnected when connection is closed and will not reconnect.
|
||||
pub async fn wait_for_events(&mut self) -> Vec<Event> {
|
||||
event_loop::wait_for_events(self).await
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue