We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
unwrap
debug_string
1 parent e0778ec commit 679eeacCopy full SHA for 679eeac
crates/matrix-sdk/src/event_cache/room/mod.rs
@@ -418,7 +418,14 @@ impl RoomEventCache {
418
/// Return a nice debug string (a vector of lines) for the linked chunk of
419
/// events for this room.
420
pub async fn debug_string(&self) -> Vec<String> {
421
- self.inner.state.read().await.unwrap().room_linked_chunk().debug_string()
+ match self.inner.state.read().await {
422
+ Ok(read_guard) => read_guard.room_linked_chunk().debug_string(),
423
+ Err(err) => {
424
+ warn!(?err, "Failed to obtain the read guard for the `RoomEventCache`");
425
+
426
+ vec![]
427
+ }
428
429
}
430
431
0 commit comments