summaryrefslogtreecommitdiffstats
path: root/third_party/rust/tokio-stream/tests/stream_empty.rs
blob: c06f5c41c01f89718513e480e4398be649e7aa38 (plain)
1
2
3
4
5
6
7
8
9
10
11
use tokio_stream::{self as stream, Stream, StreamExt};

#[tokio::test]
async fn basic_usage() {
    let mut stream = stream::empty::<i32>();

    for _ in 0..2 {
        assert_eq!(stream.size_hint(), (0, Some(0)));
        assert_eq!(None, stream.next().await);
    }
}