Skip to content

Commit

Permalink
change flush() comments on example code
Browse files Browse the repository at this point in the history
- remove flush() call from complete example code
- change phrasing on publish-only example comment
  • Loading branch information
HeCorr committed May 19, 2024
1 parent a61a59a commit 5be6e7c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions async-nats/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@
//! client.publish("messages", "data".into()).await?;
//! }
//!
//! // Flush internal buffer to make sure messages are sent
//! client.flush().await?;
//!
//! // Receive and process messages
//! while let Some(message) = subscriber.next().await {
//! println!("Received message {:?}", message);
Expand Down Expand Up @@ -88,7 +85,7 @@
//! client.publish(subject, data.clone()).await?;
//! }
//!
//! // Flush internal buffer to make sure messages are sent
//! // Flush internal buffer before exiting to make sure all messages are sent
//! client.flush().await?;
//!
//! # Ok(())
Expand Down

0 comments on commit 5be6e7c

Please sign in to comment.