Skip to content

Use wrapped BoxFuture type with must_use #1375

@nlordell

Description

@nlordell

#1372 (review)

@fleupold

Nice catch!

rust-lang/futures-rs#1691 has a proposal on how this could be worked around (by wrapping the actual BoxFuture in a struct and marking it must_use).

I'd be in favour of using such a type in our codebase wherever we return BoxFuture as these bugs can be really nasty to find (not caught by unit tests) and I really like the rust compiler warnings in these cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cleanupPRs that don't add new functionality but clean or improve the codebase

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions