reduce large stack frames

This commit is contained in:
Jason Volk
2025-04-08 03:17:23 +00:00
parent aa80e952d1
commit 4094cd52ee

View File

@@ -1,6 +1,7 @@
use std::collections::BTreeMap; use std::collections::BTreeMap;
use conduwuit::{Result, pdu::PduBuilder}; use conduwuit::{Result, pdu::PduBuilder};
use futures::FutureExt;
use ruma::{ use ruma::{
RoomId, RoomVersionId, RoomId, RoomVersionId,
events::room::{ events::room::{
@@ -63,6 +64,7 @@ pub async fn create_admin_room(services: &Services) -> Result {
&room_id, &room_id,
&state_lock, &state_lock,
) )
.boxed()
.await?; .await?;
// 2. Make server user/bot join // 2. Make server user/bot join
@@ -78,6 +80,7 @@ pub async fn create_admin_room(services: &Services) -> Result {
&room_id, &room_id,
&state_lock, &state_lock,
) )
.boxed()
.await?; .await?;
// 3. Power levels // 3. Power levels
@@ -95,6 +98,7 @@ pub async fn create_admin_room(services: &Services) -> Result {
&room_id, &room_id,
&state_lock, &state_lock,
) )
.boxed()
.await?; .await?;
// 4.1 Join Rules // 4.1 Join Rules
@@ -107,6 +111,7 @@ pub async fn create_admin_room(services: &Services) -> Result {
&room_id, &room_id,
&state_lock, &state_lock,
) )
.boxed()
.await?; .await?;
// 4.2 History Visibility // 4.2 History Visibility
@@ -122,6 +127,7 @@ pub async fn create_admin_room(services: &Services) -> Result {
&room_id, &room_id,
&state_lock, &state_lock,
) )
.boxed()
.await?; .await?;
// 4.3 Guest Access // 4.3 Guest Access
@@ -137,6 +143,7 @@ pub async fn create_admin_room(services: &Services) -> Result {
&room_id, &room_id,
&state_lock, &state_lock,
) )
.boxed()
.await?; .await?;
// 5. Events implied by name and topic // 5. Events implied by name and topic
@@ -150,6 +157,7 @@ pub async fn create_admin_room(services: &Services) -> Result {
&room_id, &room_id,
&state_lock, &state_lock,
) )
.boxed()
.await?; .await?;
services services
@@ -163,6 +171,7 @@ pub async fn create_admin_room(services: &Services) -> Result {
&room_id, &room_id,
&state_lock, &state_lock,
) )
.boxed()
.await?; .await?;
// 6. Room alias // 6. Room alias
@@ -180,6 +189,7 @@ pub async fn create_admin_room(services: &Services) -> Result {
&room_id, &room_id,
&state_lock, &state_lock,
) )
.boxed()
.await?; .await?;
services services
@@ -197,6 +207,7 @@ pub async fn create_admin_room(services: &Services) -> Result {
&room_id, &room_id,
&state_lock, &state_lock,
) )
.boxed()
.await?; .await?;
Ok(()) Ok(())