-
Notifications
You must be signed in to change notification settings - Fork 343
Closed
Description
Hi,
The StreamExt::collect in this crate (with unstable feature-flag) converts a Send stream into future that is not Send anymore. On the other hand, futures::StreamExt seems to preserve this auto trait. This is not a mission-critical issue, but thought I'll bring it to your attention anyway.
Test code to reproduce this, that yields a compilation error:
#[async_std::test]
async fn test_send() {
fn test_send_trait<T: Send>(_: &T) {}
let stream = futures::stream::pending::<()>();
test_send_trait(&stream);
use async_std::prelude::StreamExt;
let fut = stream.collect::<Vec<_>>();
// This line triggers a compilation error
test_send_trait(&fut);
}Tested on 1.4.0
Metadata
Metadata
Assignees
Labels
No labels