fix room_send example, cargo fmt/clippy
parent
fb10e9bf87
commit
1a7856e9fe
|
@ -831,7 +831,8 @@ impl AsyncClient {
|
||||||
/// * `content` - The content of the message event.
|
/// * `content` - The content of the message event.
|
||||||
///
|
///
|
||||||
/// * `txn_id` - A unique `Uuid` that can be attached to a `MessageEvent` held
|
/// * `txn_id` - A unique `Uuid` that can be attached to a `MessageEvent` held
|
||||||
/// in it's unsigned field as `transaction_id`.
|
/// in it's unsigned field as `transaction_id`. If not given one is created for the
|
||||||
|
/// message.
|
||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
|
@ -856,7 +857,7 @@ impl AsyncClient {
|
||||||
/// relates_to: None,
|
/// relates_to: None,
|
||||||
/// });
|
/// });
|
||||||
/// let txn_id = Uuid::new_v4();
|
/// let txn_id = Uuid::new_v4();
|
||||||
/// client.room_send(&room_id, content, Some(uuid)).await.unwrap();
|
/// client.room_send(&room_id, content, Some(txn_id)).await.unwrap();
|
||||||
/// })
|
/// })
|
||||||
/// ```
|
/// ```
|
||||||
pub async fn room_send(
|
pub async fn room_send(
|
||||||
|
|
|
@ -315,7 +315,8 @@ mod test {
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut builder = RoomBuilder::new();
|
let mut builder = RoomBuilder::new();
|
||||||
builder.creation_content(false)
|
builder
|
||||||
|
.creation_content(false)
|
||||||
.initial_state(vec![])
|
.initial_state(vec![])
|
||||||
.visibility(Visibility::Public)
|
.visibility(Visibility::Public)
|
||||||
.name("room_name")
|
.name("room_name")
|
||||||
|
@ -363,7 +364,8 @@ mod test {
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut builder = RoomMessageBuilder::new();
|
let mut builder = RoomMessageBuilder::new();
|
||||||
builder.room_id(RoomId::try_from("!roomid:example.com").unwrap())
|
builder
|
||||||
|
.room_id(RoomId::try_from("!roomid:example.com").unwrap())
|
||||||
.from("t47429-4392820_219380_26003_2265".to_string())
|
.from("t47429-4392820_219380_26003_2265".to_string())
|
||||||
.to("t4357353_219380_26003_2265".to_string())
|
.to("t4357353_219380_26003_2265".to_string())
|
||||||
.direction(Direction::Backward)
|
.direction(Direction::Backward)
|
||||||
|
|
Loading…
Reference in New Issue