From 5be6e7cda639cf9873a9db55e95f54b562c4c5ed Mon Sep 17 00:00:00 2001 From: HeCorr Date: Sun, 19 May 2024 16:06:50 -0300 Subject: [PATCH] change flush() comments on example code - remove flush() call from complete example code - change phrasing on publish-only example comment --- async-nats/src/lib.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/async-nats/src/lib.rs b/async-nats/src/lib.rs index fa3cadadf..f6e20a527 100755 --- a/async-nats/src/lib.rs +++ b/async-nats/src/lib.rs @@ -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); @@ -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(())