File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -587,16 +587,12 @@ extension_trait! {
587587 use async_std::stream;
588588 use std::time::Duration;
589589
590- let a = stream::once(1).delay(Duration::from_millis(200));
591- let b = stream::once(2).delay(Duration::from_millis(100));
592- let c = stream::once(3).delay(Duration::from_millis(300));
590+ let mut s = stream::from_iter(vec![0u8, 1, 2]).delay(Duration::from_millis(200));
593591
594- let s = stream::join!(a, b, c);
595-
596- assert_eq!(stream.next().await, Some(1));
597- assert_eq!(stream.next().await, Some(2));
598- assert_eq!(stream.next().await, Some(3));
599- assert_eq!(stream.next().await, None);
592+ assert_eq!(s.next().await, Some(0));
593+ assert_eq!(s.next().await, Some(1));
594+ assert_eq!(s.next().await, Some(2));
595+ assert_eq!(s.next().await, None);
600596 #
601597 # }) }
602598 ```
You can’t perform that action at this time.
0 commit comments