From e2480be47f18face1ce527562fc9c88bc04d00d4 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Wed, 7 Jun 2023 20:51:04 +0200 Subject: [PATCH] feat(ffi): Make `RoomList::entries` async. Because we can! --- bindings/matrix-sdk-ffi/src/room_list.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bindings/matrix-sdk-ffi/src/room_list.rs b/bindings/matrix-sdk-ffi/src/room_list.rs index 64d51ede3..bf2668c21 100644 --- a/bindings/matrix-sdk-ffi/src/room_list.rs +++ b/bindings/matrix-sdk-ffi/src/room_list.rs @@ -72,12 +72,11 @@ impl RoomList { }))) } - fn entries( + async fn entries( &self, listener: Box, ) -> Result { - let (entries, entries_stream) = - RUNTIME.block_on(async { self.inner.entries().await.map_err(RoomListError::from) })?; + let (entries, entries_stream) = self.inner.entries().await.map_err(RoomListError::from)?; Ok(RoomListEntriesResult { entries: entries.iter().map(Into::into).collect(),