Skip to content

Commit

Permalink
Fix clippy/fmt failures
Browse files Browse the repository at this point in the history
  • Loading branch information
jsudano authored and jsudano committed Nov 14, 2024
1 parent 712580f commit 77a3381
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion async-nats/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,10 @@ impl Client {
///
/// # // existing subscriptions are closed and further commands will fail
/// assert!(subscription.next().await.is_none());
/// client.subscribe().await.expect_err("Expected further commands to fail");
/// client
/// .subscribe()
/// .await
/// .expect_err("Expected further commands to fail");
///
/// # Ok(())
/// # }
Expand Down
2 changes: 1 addition & 1 deletion async-nats/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ impl ConnectionHandler {
debug!("reconnected");
}
ExitReason::Closed => {
//
// Safe to ignore result as we're shutting down anyway
self.connector.events_tx.try_send(Event::Closed).ok();
break;
}
Expand Down
2 changes: 1 addition & 1 deletion async-nats/tests/client_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ mod client {
tokio::time::sleep(Duration::from_millis(1)).await;

// assert the subscription stream is closed after draining
let sleep_fut = async move { while let Some(_) = sub.next().await {} };
let sleep_fut = async move { while sub.next().await.is_some() {} };
tokio::time::timeout(Duration::from_secs(10), sleep_fut)
.await
.expect("Expected stream to drain within 10s");
Expand Down

0 comments on commit 77a3381

Please sign in to comment.