diff --git a/bindings/matrix-sdk-ffi/src/room_list.rs b/bindings/matrix-sdk-ffi/src/room_list.rs index 0715a399d..13d0be762 100644 --- a/bindings/matrix-sdk-ffi/src/room_list.rs +++ b/bindings/matrix-sdk-ffi/src/room_list.rs @@ -87,17 +87,17 @@ pub struct RoomList { #[uniffi::export] impl RoomList { - fn sync(&self) -> Arc { + fn sync(&self) { let this = self.inner.clone(); - Arc::new(TaskHandle::new(RUNTIME.spawn(async move { + RUNTIME.spawn(async move { let sync_stream = this.sync(); pin_mut!(sync_stream); while sync_stream.next().await.is_some() { // keep going! } - }))) + }); } fn stop_sync(&self) -> Result<(), RoomListError> {