Add async context to register_event_handler doctest

master
Jonas Platte 2021-09-09 00:49:04 +02:00
parent 97731d1240
commit c3081de611
No known key found for this signature in database
GPG Key ID: 7D261D771D915378
1 changed files with 2 additions and 0 deletions

View File

@ -917,6 +917,7 @@ impl Client {
/// };
/// use serde::{Deserialize, Serialize};
///
/// # let _ = async {
/// client
/// .register_event_handler(
/// |ev: SyncMessageEvent<MessageEventContent>, room: Room, client: Client| async move {
@ -944,6 +945,7 @@ impl Client {
/// todo!("Display the token");
/// },
/// ).await;
/// # };
/// ```
pub async fn register_event_handler<Ev, Ctx, H>(&self, handler: H) -> &Self
where