Fix EventBuilder docstring example.
parent
048a2000e7
commit
7d9a699d62
|
@ -58,15 +58,14 @@ pub enum EventsJson {
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// use matrix_sdk_test::{EventBuilder, EventsJson};
|
/// use matrix_sdk_test::{EventBuilder, EventsJson};
|
||||||
/// use matrix_sdk_common::events::collections::all::RoomEvent;
|
|
||||||
///
|
///
|
||||||
/// let mut builder = EventBuilder::new();
|
/// let mut builder = EventBuilder::new();
|
||||||
///
|
///
|
||||||
/// // response1 now contains events that add an example member to the room and change their power
|
/// // response1 now contains events that add an example member to the room and change their power
|
||||||
/// // level
|
/// // level
|
||||||
/// let response1 = builder
|
/// let response1 = builder
|
||||||
/// .add_room_event(EventsJson::Member, RoomEvent::RoomMember)
|
/// .add_room_event(EventsJson::Member)
|
||||||
/// .add_room_event(EventsJson::PowerLevels, RoomEvent::RoomPowerLevels)
|
/// .add_room_event(EventsJson::PowerLevels)
|
||||||
/// .build_sync_response();
|
/// .build_sync_response();
|
||||||
///
|
///
|
||||||
/// // response2 is now empty (nothing changed)
|
/// // response2 is now empty (nothing changed)
|
||||||
|
@ -74,7 +73,7 @@ pub enum EventsJson {
|
||||||
///
|
///
|
||||||
/// // response3 contains a display name change for member example
|
/// // response3 contains a display name change for member example
|
||||||
/// let response3 = builder
|
/// let response3 = builder
|
||||||
/// .add_room_event(EventsJson::MemberNameChange, RoomEvent::RoomMember)
|
/// .add_room_event(EventsJson::MemberNameChange)
|
||||||
/// .build_sync_response();
|
/// .build_sync_response();
|
||||||
/// ```
|
/// ```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue