• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 use tokio_stream::{self as stream, Stream, StreamExt};
2 
3 #[tokio::test]
basic_usage()4 async fn basic_usage() {
5     let mut one = stream::once(1);
6 
7     assert_eq!(one.size_hint(), (1, Some(1)));
8     assert_eq!(Some(1), one.next().await);
9 
10     assert_eq!(one.size_hint(), (0, Some(0)));
11     assert_eq!(None, one.next().await);
12 }
13