matrix: add #[must_use] on room_label per review
This commit is contained in:
parent
1b1c6e03b9
commit
1b0f035a05
1 changed files with 1 additions and 0 deletions
|
|
@ -137,6 +137,7 @@ fn extract_body_sync(event: &matrix_sdk::ruma::events::AnySyncTimelineEvent) ->
|
|||
/// Human-facing label for a room: its canonical alias when set,
|
||||
/// otherwise the raw room id. Used wherever a room is named in
|
||||
/// agent-facing text (wake bodies, loose-ends, the unread guard).
|
||||
#[must_use]
|
||||
pub fn room_label(room: &matrix_sdk::Room) -> String {
|
||||
room.canonical_alias()
|
||||
.map_or_else(|| room.room_id().to_string(), |a| a.to_string())
|
||||
|
|
|
|||
Loading…
Reference in a new issue