summaryrefslogtreecommitdiffstats
path: root/tokio/tests/stream_empty.rs
blob: f278076d1ae5332c2c7f741667895b3f7c2199cd (plain)
1
2
3
4
5
6
7
8
9
10
11
use tokio::stream::{self, 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);
    }
}