From e8cf5f4f0edbbda9a4acd52f75dc658f0149f875 Mon Sep 17 00:00:00 2001 From: David Pedersen Date: Sun, 6 Aug 2023 20:43:24 +0200 Subject: [PATCH] Mention tokio-stream in SSE example --- examples/sse/src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/sse/src/main.rs b/examples/sse/src/main.rs index bb60cedf..679412ea 100644 --- a/examples/sse/src/main.rs +++ b/examples/sse/src/main.rs @@ -50,6 +50,9 @@ async fn sse_handler( println!("`{}` connected", user_agent.as_str()); // A `Stream` that repeats an event every second + // + // You can also create streams from tokio channels using the wrappers in + // https://docs.rs/tokio-stream let stream = stream::repeat_with(|| Event::default().data("hi!")) .map(Ok) .throttle(Duration::from_secs(1));