File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
crates/matrix-sdk/src/latest_events Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -537,14 +537,11 @@ async fn listen_to_event_cache_and_send_queue_updates_task(
537
537
538
538
// Initialise the list of rooms that are listened.
539
539
//
540
- // Technically, we can use `rooms` to get this information, but it would involve
541
- // a read-lock. In order to reduce the pressure on this lock, we use
542
- // this intermediate structure.
543
- let mut listened_rooms = {
544
- let rooms = registered_rooms. rooms . read ( ) . await ;
545
-
546
- HashSet :: from_iter ( rooms. keys ( ) . cloned ( ) )
547
- } ;
540
+ // Technically, we can use `registered_rooms.rooms` every time to get this
541
+ // information, but it would involve a read-lock. In order to reduce the
542
+ // pressure on this lock, we use this intermediate structure.
543
+ let mut listened_rooms =
544
+ HashSet :: from_iter ( registered_rooms. rooms . read ( ) . await . keys ( ) . cloned ( ) ) ;
548
545
549
546
loop {
550
547
if listen_to_event_cache_and_send_queue_updates (
You can’t perform that action at this time.
0 commit comments