diff --git a/async-stream/tests/stream.rs b/async-stream/tests/stream.rs index 32af96c..2354692 100644 --- a/async-stream/tests/stream.rs +++ b/async-stream/tests/stream.rs @@ -8,11 +8,25 @@ use tokio_test::assert_ok; #[tokio::test] async fn noop_stream() { - fn unit() -> impl Stream { + fn any() -> impl Stream { stream! {} } - let s = unit(); + let s = any::<()>(); + pin_mut!(s); + + while let Some(_) = s.next().await { + unreachable!(); + } + + let s = any::(); + pin_mut!(s); + + while let Some(_) = s.next().await { + unreachable!(); + } + + let s = any::(); pin_mut!(s); while let Some(_) = s.next().await {