Skip to content

Better lifetime bounds for traits methods that return futures #56

Open
@matko

Description

@matko

Many of the trait methods that return futures return a future with a static lifetime bound. This requires these futures to take ownership of any data in self they require through cloning. While we usually can do that, since many of the data structures we actually use are wrapped in an Arc, it is actually unnecessary. By specifying that the future we return has the same lifetime as the self reference, it should be possible to write implementations that don't need to take ownership.

Trait methods should be rewritten to have these better lifetimes.

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