Skip to content

[tokio-async-await] Stream support #595

Closed
@lnicola

Description

@lnicola

I was trying to port over some server code using hyper and I ran into this error:

error[E0277]: `(dyn futures::stream::Stream<Item=hyper::Chunk, Error=std::boxed::Box<(dyn std::error::Error + std::marker::Sync + std::marker::Send + 'static)>> + std::marker::Send + 'static)` cannot be shared between threads safely

After asking on Gitter, the issue might be that the compiler doesn't recognize that hyper::Body (which is, more or less, a Stream) can be Unpin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions