Add missing `.await`s in event handler doctests

master
Jonas Platte 2021-09-08 23:25:16 +02:00
parent ce0cb273bb
commit 8c499a63dc
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67
1 changed files with 3 additions and 3 deletions

View File

@ -921,10 +921,10 @@ impl Client {
/// |ev: SyncMessageEvent<MessageEventContent>, room: Room, client: Client| async move {
/// // Common usage: Room event plus room and client.
/// },
/// );
/// ).await;
/// client.register_event_handler(|ev: SyncStateEvent<TopicEventContent>| async move {
/// // Also possible: Omit any or all arguments after the first.
/// });
/// }).await;
///
/// // Custom events work exactly the same way, you just need to declare the content struct and
/// // use the EventContent derive macro on it.
@ -940,7 +940,7 @@ impl Client {
/// |ev: SyncMessageEvent<TokenEventContent>, room: Room| async move {
/// todo!("Display the token");
/// },
/// );
/// ).await;
/// ```
pub async fn register_event_handler<Ev, Ctx, H>(&self, handler: H)
where