init a few vecs in event_handler using with_capacity

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry authored and June 🍓🦴 committed 2024-05-25 22:28:43 -04:00
1 parent d49507bc21
commit e098448b9d
2 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -163,7 +163,7 @@ pub(crate) async fn get_context_route(body: Ruma<get_context::v3::Request>) -> R
.map(|(_, pdu)| pdu.to_room_event())
.collect();
let mut state = Vec::new();
let mut state = Vec::with_capacity(state_ids.len());
for (shortstatekey, id) in state_ids {
let (event_type, state_key) = services()