async-rs / async-rs/async-std

Future returned by Stream::sum() is not Send

Open
#754 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.1k
Forks
339
PR merge metrics
No merged PRs in 30d

Description

This appears to be because `Sum::sum()` returns `Pin>>` without a `+ Send` bound: https://github.com/async-rs/async-std/blob/b446cd023084a157b8a531cff65b8df37750be58/src/stream/sum.rs#L21

This may need to be replaced with a bespoke future type that can implement `Send` if the stream and item type are `Send`.

Reported on the SQLx Discord: https://discordapp.com/channels/665528275556106240/665528275556106243/702983789940310046

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.