@@ -69,7 +69,7 @@ async fn test_event_cache_receives_events() {
6969
7070 // If I create a room event subscriber,
7171 let ( room_event_cache, _drop_handles) = room. event_cache ( ) . await . unwrap ( ) ;
72- let ( events, mut subscriber) = room_event_cache. subscribe ( ) . await . unwrap ( ) ;
72+ let ( events, mut subscriber) = room_event_cache. subscribe ( ) . await ;
7373
7474 // Then at first it's empty, and the subscriber doesn't yield anything.
7575 assert ! ( events. is_empty( ) ) ;
@@ -143,7 +143,7 @@ async fn test_ignored_unignored() {
143143 // And subscribe to the room,
144144 let room = client. get_room ( room_id) . unwrap ( ) ;
145145 let ( room_event_cache, _drop_handles) = room. event_cache ( ) . await . unwrap ( ) ;
146- let ( events, mut room_stream) = room_event_cache. subscribe ( ) . await . unwrap ( ) ;
146+ let ( events, mut room_stream) = room_event_cache. subscribe ( ) . await ;
147147
148148 // Then at first it contains the two initial events.
149149 assert_eq ! ( events. len( ) , 2 ) ;
@@ -201,7 +201,7 @@ async fn test_ignored_unignored() {
201201 {
202202 let room = client. get_room ( other_room_id) . unwrap ( ) ;
203203 let ( room_event_cache, _drop_handles) = room. event_cache ( ) . await . unwrap ( ) ;
204- let ( events, _) = room_event_cache. subscribe ( ) . await . unwrap ( ) ;
204+ let ( events, _) = room_event_cache. subscribe ( ) . await ;
205205 assert ! ( events. is_empty( ) ) ;
206206 }
207207
@@ -256,7 +256,7 @@ async fn test_backpaginate_once() {
256256
257257 let ( room_event_cache, _drop_handles) = room. event_cache ( ) . await . unwrap ( ) ;
258258
259- let ( events, mut room_stream) = room_event_cache. subscribe ( ) . await . unwrap ( ) ;
259+ let ( events, mut room_stream) = room_event_cache. subscribe ( ) . await ;
260260
261261 // This is racy: either the initial message has been processed by the event
262262 // cache (and no room updates will happen in this case), or it hasn't, and
@@ -341,7 +341,7 @@ async fn test_backpaginate_many_times_with_many_iterations() {
341341
342342 let ( room_event_cache, _drop_handles) = room. event_cache ( ) . await . unwrap ( ) ;
343343
344- let ( events, mut room_stream) = room_event_cache. subscribe ( ) . await . unwrap ( ) ;
344+ let ( events, mut room_stream) = room_event_cache. subscribe ( ) . await ;
345345
346346 // This is racy: either the initial message has been processed by the event
347347 // cache (and no room updates will happen in this case), or it hasn't, and
@@ -437,7 +437,7 @@ async fn test_backpaginate_many_times_with_many_iterations() {
437437 assert ! ( room_stream. is_empty( ) ) ;
438438
439439 // And next time I'll open the room, I'll get the events in the right order.
440- let ( events, room_stream) = room_event_cache. subscribe ( ) . await . unwrap ( ) ;
440+ let ( events, room_stream) = room_event_cache. subscribe ( ) . await ;
441441
442442 assert_event_matches_msg ( & events[ 0 ] , "oh well" ) ;
443443 assert_event_matches_msg ( & events[ 1 ] , "hello" ) ;
@@ -479,7 +479,7 @@ async fn test_backpaginate_many_times_with_one_iteration() {
479479 let ( room_event_cache, _drop_handles) =
480480 client. get_room ( room_id) . unwrap ( ) . event_cache ( ) . await . unwrap ( ) ;
481481
482- let ( events, mut room_stream) = room_event_cache. subscribe ( ) . await . unwrap ( ) ;
482+ let ( events, mut room_stream) = room_event_cache. subscribe ( ) . await ;
483483
484484 // This is racy: either the initial message has been processed by the event
485485 // cache (and no room updates will happen in this case), or it hasn't, and
@@ -577,7 +577,7 @@ async fn test_backpaginate_many_times_with_one_iteration() {
577577 } ) ;
578578
579579 // And next time I'll open the room, I'll get the events in the right order.
580- let ( events, room_stream) = room_event_cache. subscribe ( ) . await . unwrap ( ) ;
580+ let ( events, room_stream) = room_event_cache. subscribe ( ) . await ;
581581
582582 assert_event_matches_msg ( & events[ 0 ] , "oh well" ) ;
583583 assert_event_matches_msg ( & events[ 1 ] , "hello" ) ;
@@ -619,7 +619,7 @@ async fn test_reset_while_backpaginating() {
619619 let ( room_event_cache, _drop_handles) =
620620 client. get_room ( room_id) . unwrap ( ) . event_cache ( ) . await . unwrap ( ) ;
621621
622- let ( events, mut room_stream) = room_event_cache. subscribe ( ) . await . unwrap ( ) ;
622+ let ( events, mut room_stream) = room_event_cache. subscribe ( ) . await ;
623623
624624 wait_for_initial_events ( events, & mut room_stream) . await ;
625625
@@ -763,7 +763,7 @@ async fn test_backpaginating_without_token() {
763763 let room = server. sync_joined_room ( & client, room_id) . await ;
764764 let ( room_event_cache, _drop_handles) = room. event_cache ( ) . await . unwrap ( ) ;
765765
766- let ( events, mut room_stream) = room_event_cache. subscribe ( ) . await . unwrap ( ) ;
766+ let ( events, mut room_stream) = room_event_cache. subscribe ( ) . await ;
767767
768768 assert ! ( events. is_empty( ) ) ;
769769 assert ! ( room_stream. is_empty( ) ) ;
@@ -821,7 +821,7 @@ async fn test_limited_timeline_resets_pagination() {
821821
822822 let ( room_event_cache, _drop_handles) = room. event_cache ( ) . await . unwrap ( ) ;
823823
824- let ( events, mut room_stream) = room_event_cache. subscribe ( ) . await . unwrap ( ) ;
824+ let ( events, mut room_stream) = room_event_cache. subscribe ( ) . await ;
825825
826826 assert ! ( events. is_empty( ) ) ;
827827 assert ! ( room_stream. is_empty( ) ) ;
@@ -908,7 +908,7 @@ async fn test_limited_timeline_with_storage() {
908908 )
909909 . await ;
910910
911- let ( initial_events, mut subscriber) = room_event_cache. subscribe ( ) . await . unwrap ( ) ;
911+ let ( initial_events, mut subscriber) = room_event_cache. subscribe ( ) . await ;
912912
913913 // This is racy: either the sync has been handled, or it hasn't yet.
914914 if initial_events. is_empty ( ) {
@@ -980,7 +980,7 @@ async fn test_limited_timeline_without_storage() {
980980 )
981981 . await ;
982982
983- let ( initial_events, mut subscriber) = room_event_cache. subscribe ( ) . await . unwrap ( ) ;
983+ let ( initial_events, mut subscriber) = room_event_cache. subscribe ( ) . await ;
984984
985985 // This is racy: either the sync has been handled, or it hasn't yet.
986986 if initial_events. is_empty ( ) {
@@ -1115,7 +1115,7 @@ async fn test_backpaginate_with_no_initial_events() {
11151115 pagination. run_backwards ( 20 , once) . await . unwrap ( ) ;
11161116
11171117 // The linked chunk should contain the events in the correct order.
1118- let ( events, _stream) = room_event_cache. subscribe ( ) . await . unwrap ( ) ;
1118+ let ( events, _stream) = room_event_cache. subscribe ( ) . await ;
11191119
11201120 assert_eq ! ( events. len( ) , 3 , "{events:?}" ) ;
11211121 assert_event_matches_msg ( & events[ 0 ] , "oh well" ) ;
@@ -1150,7 +1150,7 @@ async fn test_backpaginate_replace_empty_gap() {
11501150
11511151 let ( room_event_cache, _drop_handles) = room. event_cache ( ) . await . unwrap ( ) ;
11521152
1153- let ( events, mut stream) = room_event_cache. subscribe ( ) . await . unwrap ( ) ;
1153+ let ( events, mut stream) = room_event_cache. subscribe ( ) . await ;
11541154 wait_for_initial_events ( events, & mut stream) . await ;
11551155
11561156 // The first back-pagination will return a previous-batch token, but no events.
@@ -1178,7 +1178,7 @@ async fn test_backpaginate_replace_empty_gap() {
11781178 pagination. run_backwards ( 20 , once) . await . unwrap ( ) ;
11791179
11801180 // The linked chunk should contain the events in the correct order.
1181- let ( events, _stream) = room_event_cache. subscribe ( ) . await . unwrap ( ) ;
1181+ let ( events, _stream) = room_event_cache. subscribe ( ) . await ;
11821182
11831183 assert_event_matches_msg ( & events[ 0 ] , "hello" ) ;
11841184 assert_event_matches_msg ( & events[ 1 ] , "world" ) ;
@@ -1219,7 +1219,7 @@ async fn test_no_gap_stored_after_deduplicated_sync() {
12191219
12201220 let ( room_event_cache, _drop_handles) = room. event_cache ( ) . await . unwrap ( ) ;
12211221
1222- let ( events, mut stream) = room_event_cache. subscribe ( ) . await . unwrap ( ) ;
1222+ let ( events, mut stream) = room_event_cache. subscribe ( ) . await ;
12231223
12241224 if events. is_empty ( ) {
12251225 assert_let_timeout ! ( Ok ( RoomEventCacheUpdate :: UpdateTimelineEvents { .. } ) = stream. recv( ) ) ;
@@ -1259,7 +1259,7 @@ async fn test_no_gap_stored_after_deduplicated_sync() {
12591259 let outcome = pagination. run_backwards ( 20 , once) . await . unwrap ( ) ;
12601260 assert ! ( outcome. reached_start) ;
12611261
1262- let ( events, stream) = room_event_cache. subscribe ( ) . await . unwrap ( ) ;
1262+ let ( events, stream) = room_event_cache. subscribe ( ) . await ;
12631263 assert_event_matches_msg ( & events[ 0 ] , "hello" ) ;
12641264 assert_event_matches_msg ( & events[ 1 ] , "world" ) ;
12651265 assert_event_matches_msg ( & events[ 2 ] , "sup" ) ;
@@ -1296,7 +1296,7 @@ async fn test_no_gap_stored_after_deduplicated_backpagination() {
12961296
12971297 let ( room_event_cache, _drop_handles) = room. event_cache ( ) . await . unwrap ( ) ;
12981298
1299- let ( events, mut stream) = room_event_cache. subscribe ( ) . await . unwrap ( ) ;
1299+ let ( events, mut stream) = room_event_cache. subscribe ( ) . await ;
13001300
13011301 if events. is_empty ( ) {
13021302 assert_let_timeout ! ( Ok ( RoomEventCacheUpdate :: UpdateTimelineEvents { .. } ) = stream. recv( ) ) ;
@@ -1391,7 +1391,7 @@ async fn test_no_gap_stored_after_deduplicated_backpagination() {
13911391 assert ! ( outcome. events. is_empty( ) ) ;
13921392 assert ! ( stream. is_empty( ) ) ;
13931393
1394- let ( events, stream) = room_event_cache. subscribe ( ) . await . unwrap ( ) ;
1394+ let ( events, stream) = room_event_cache. subscribe ( ) . await ;
13951395 assert_event_matches_msg ( & events[ 0 ] , "hello" ) ;
13961396 assert_event_matches_msg ( & events[ 1 ] , "world" ) ;
13971397 assert_event_matches_msg ( & events[ 2 ] , "sup" ) ;
@@ -1428,7 +1428,7 @@ async fn test_dont_delete_gap_that_wasnt_inserted() {
14281428
14291429 let ( room_event_cache, _drop_handles) = room. event_cache ( ) . await . unwrap ( ) ;
14301430
1431- let ( events, mut stream) = room_event_cache. subscribe ( ) . await . unwrap ( ) ;
1431+ let ( events, mut stream) = room_event_cache. subscribe ( ) . await ;
14321432 if events. is_empty ( ) {
14331433 assert_let_timeout ! ( Ok ( RoomEventCacheUpdate :: UpdateTimelineEvents { .. } ) = stream. recv( ) ) ;
14341434 }
@@ -1492,7 +1492,7 @@ async fn test_apply_redaction_when_redaction_comes_later() {
14921492 let ( room_event_cache, _drop_handles) = room. event_cache ( ) . await . unwrap ( ) ;
14931493
14941494 // Wait for the first event.
1495- let ( events, mut subscriber) = room_event_cache. subscribe ( ) . await . unwrap ( ) ;
1495+ let ( events, mut subscriber) = room_event_cache. subscribe ( ) . await ;
14961496 if events. is_empty ( ) {
14971497 assert_let_timeout ! (
14981498 Ok ( RoomEventCacheUpdate :: UpdateTimelineEvents { .. } ) = subscriber. recv( )
@@ -1554,7 +1554,7 @@ async fn test_apply_redaction_when_redacted_and_redaction_are_in_same_sync() {
15541554 let room_id = room_id ! ( "!omelette:fromage.fr" ) ;
15551555 let room = server. sync_joined_room ( & client, room_id) . await ;
15561556 let ( room_event_cache, _drop_handles) = room. event_cache ( ) . await . unwrap ( ) ;
1557- let ( _events, mut subscriber) = room_event_cache. subscribe ( ) . await . unwrap ( ) ;
1557+ let ( _events, mut subscriber) = room_event_cache. subscribe ( ) . await ;
15581558
15591559 let f = EventFactory :: new ( ) . room ( room_id) . sender ( user_id ! ( "@a:b.c" ) ) ;
15601560
0 commit comments