Commit 77a3381 1 parent 712580f commit 77a3381 Copy full SHA for 77a3381
File tree 3 files changed +6
-3
lines changed
3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -647,7 +647,10 @@ impl Client {
647
647
///
648
648
/// # // existing subscriptions are closed and further commands will fail
649
649
/// assert!(subscription.next().await.is_none());
650
- /// client.subscribe().await.expect_err("Expected further commands to fail");
650
+ /// client
651
+ /// .subscribe()
652
+ /// .await
653
+ /// .expect_err("Expected further commands to fail");
651
654
///
652
655
/// # Ok(())
653
656
/// # }
Original file line number Diff line number Diff line change @@ -651,7 +651,7 @@ impl ConnectionHandler {
651
651
debug ! ( "reconnected" ) ;
652
652
}
653
653
ExitReason :: Closed => {
654
- //
654
+ // Safe to ignore result as we're shutting down anyway
655
655
self . connector . events_tx . try_send ( Event :: Closed ) . ok ( ) ;
656
656
break ;
657
657
}
Original file line number Diff line number Diff line change @@ -1131,7 +1131,7 @@ mod client {
1131
1131
tokio:: time:: sleep ( Duration :: from_millis ( 1 ) ) . await ;
1132
1132
1133
1133
// assert the subscription stream is closed after draining
1134
- let sleep_fut = async move { while let Some ( _ ) = sub. next ( ) . await { } } ;
1134
+ let sleep_fut = async move { while sub. next ( ) . await . is_some ( ) { } } ;
1135
1135
tokio:: time:: timeout ( Duration :: from_secs ( 10 ) , sleep_fut)
1136
1136
. await
1137
1137
. expect ( "Expected stream to drain within 10s" ) ;
You can’t perform that action at this time.
0 commit comments