src: matrix: Use unwrap_or_default()

This commit is contained in:
mirsal committed 2026-09-17 12:49:16 +00:00
1 parent 19877c0ac4
commit db0eb7db5e
1 file changed
+1 -1
+1 -1
View File
@@ -93,7 +93,7 @@ async fn send_to_room(
let res = room.send(RoomMessageEventContent::text_html(msg.clone(), msg)).await?;
debug!("Retrieving list of pinned events");
let mut old_pinned_eids = room.pinned_event_ids().unwrap_or(Vec::new());
let mut old_pinned_eids = room.pinned_event_ids().unwrap_or_default();
let mut new_pinned_eids = Vec::with_capacity(old_pinned_eids.len());
for eid in old_pinned_eids.drain(..) {