src: matrix: Use unwrap_or_default()
This commit is contained in:
1 file changed
+1
-1
+1
-1
@@ -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(..) {
|
||||
|
||||
Reference in new issue
Block a user