Skip to content

Commit 77a3381

Browse files
jsudanojsudano
jsudano
authored andcommitted
Fix clippy/fmt failures
1 parent 712580f commit 77a3381

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

async-nats/src/client.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,10 @@ impl Client {
647647
///
648648
/// # // existing subscriptions are closed and further commands will fail
649649
/// 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");
651654
///
652655
/// # Ok(())
653656
/// # }

async-nats/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ impl ConnectionHandler {
651651
debug!("reconnected");
652652
}
653653
ExitReason::Closed => {
654-
//
654+
// Safe to ignore result as we're shutting down anyway
655655
self.connector.events_tx.try_send(Event::Closed).ok();
656656
break;
657657
}

async-nats/tests/client_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1131,7 +1131,7 @@ mod client {
11311131
tokio::time::sleep(Duration::from_millis(1)).await;
11321132

11331133
// 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() {} };
11351135
tokio::time::timeout(Duration::from_secs(10), sleep_fut)
11361136
.await
11371137
.expect("Expected stream to drain within 10s");

0 commit comments

Comments
 (0)