Rebox future segmentations.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-07-08 11:48:45 +00:00
parent aac49b09c7
commit 18f8d6c65c
14 changed files with 43 additions and 32 deletions

View File

@@ -2,7 +2,7 @@ use std::{borrow::Borrow, collections::HashMap, iter::once, sync::Arc};
use axum::extract::State;
use axum_client_ip::InsecureClientIp;
use futures::{FutureExt, StreamExt};
use futures::{FutureExt, StreamExt, pin_mut};
use ruma::{
CanonicalJsonObject, CanonicalJsonValue, OwnedRoomId, OwnedServerName, OwnedUserId, RoomId,
RoomVersionId, UserId,
@@ -747,7 +747,7 @@ async fn join_room_by_id_helper_local(
})
.await
{
services
let users = services
.rooms
.state_cache
.local_users_in_room(room_id)
@@ -759,10 +759,10 @@ async fn join_room_by_id_helper_local(
&state_lock,
)
})
.boxed()
.next()
.await
.map(ToOwned::to_owned)
.map(ToOwned::to_owned);
pin_mut!(users);
users.next().await
} else {
None
}