Skip to content

Commit

Permalink
Fix the doc
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Pietrek <[email protected]>
  • Loading branch information
Jarema committed Oct 14, 2024
1 parent 50e3849 commit 3dbbf9e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions async-nats/src/jetstream/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,16 +166,15 @@ impl Stream<Info> {
/// ```no_run
/// # #[tokio::main]
/// # async fn main() -> Result<(), async_nats::Error> {
/// use futures::StreamExt;
/// use futures::TryStreamExt;
/// let client = async_nats::connect("localhost:4222").await?;
/// let jetstream = async_nats::jetstream::new(client);
///
/// let mut stream = jetstream.get_stream("events").await?;
///
/// let mut info = stream.info_with_subjects("events.>").await?;
///
/// while let Some(subject) = info.next().await {
/// let (subject, count) = subject?;
/// while let Some((subject, count)) = info.try_next().await? {
/// println!("Subject: {} count: {}", subject, count);
/// }
/// # Ok(())
Expand Down

0 comments on commit 3dbbf9e

Please sign in to comment.