Refactor to async closures.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-07-08 11:08:58 +00:00
parent cca0f20148
commit c8d35cca57
36 changed files with 78 additions and 80 deletions

View File

@@ -550,7 +550,7 @@ async fn join_room_by_id_helper_remote(
.validate_and_add_event_id_no_fetch(pdu, &room_version_id)
})
.ready_filter_map(Result::ok)
.fold(HashMap::new(), |mut state, (event_id, value)| async move {
.fold(HashMap::new(), async |mut state, (event_id, value)| {
let pdu = match PduEvent::from_id_val(&event_id, value.clone()) {
| Ok(pdu) => pdu,
| Err(e) => {

View File

@@ -85,7 +85,7 @@ pub(crate) async fn joined_members_route(
.state_cache
.room_members(&body.room_id)
.map(ToOwned::to_owned)
.broad_then(|user_id| async move {
.broad_then(async |user_id| {
let (display_name, avatar_url) = join(
services.users.displayname(&user_id).ok(),
services.users.avatar_url(&user_id).ok(),