Skip to content

Consider removing .boxed() combinators and the Box aliases #228

Closed
@carllerche

Description

@carllerche

.boxed() has to be hard coded to either be Send + 'static or not. Where as calling Box::new is able to infer which it should be. Given this, when a user tries to call boxed() but the future is not Send, a compilation error happens. I've noticed that this often causes confusion and it seems to be one of the more common questions that is asked in the gitter channel.

I propose to remove boxed in favor of explicitly calling Box::new.

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