We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58f4642 commit c6836ecCopy full SHA for c6836ec
tests/collect.rs
@@ -1,18 +1,20 @@
1
-use async_std::prelude::*;
2
-use async_std::io;
3
-use async_std::task;
4
-
+#[cfg(feature = "unstable")]
5
#[test]
6
-fn test_send() -> io::Result<()> {
+fn test_send() -> async_std::io::Result<()> {
+ use async_std::prelude::*;
+ use async_std::{stream, task};
+
7
task::block_on(async {
8
fn test_send_trait<T: Send>(_: &T) {}
9
10
- let stream = futures::stream::pending::<()>();
+ let stream = stream::repeat(1u8).take(10);
11
test_send_trait(&stream);
12
13
let fut = stream.collect::<Vec<_>>();
14
15
// This line triggers a compilation error
16
test_send_trait(&fut);
17
18
+ Ok(())
19
})
20
}
0 commit comments