matrix: add #[must_use] on room_label per review

This commit is contained in:
damocles 2026-06-15 12:13:39 +02:00 committed by mara
commit 1b0f035a05

View file

@ -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())