diff --git a/matrix_sdk/src/client.rs b/matrix_sdk/src/client.rs index ba261ce0..0cee924a 100644 --- a/matrix_sdk/src/client.rs +++ b/matrix_sdk/src/client.rs @@ -921,10 +921,10 @@ impl Client { /// |ev: SyncMessageEvent, room: Room, client: Client| async move { /// // Common usage: Room event plus room and client. /// }, - /// ); + /// ).await; /// client.register_event_handler(|ev: SyncStateEvent| 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, room: Room| async move { /// todo!("Display the token"); /// }, - /// ); + /// ).await; /// ``` pub async fn register_event_handler(&self, handler: H) where