Skip to content

Ban manual implementation of TryFuture and TryStream #1776

@taiki-e

Description

@taiki-e

Future<Output = Result<T, E>> automatically implements Tryfuture. Also it can call .await and FutureExt's methods without TryFuture::into_future.

Also, we may want to rewrite this trait to inherit Future in the future, so I think it makes sense to ban manual implementation for forward compatibility.
https://github.com/rust-lang-nursery/futures-rs/blob/78c5d852ec24edcf630a4c569c1234d078416f4f/futures-core/src/future/mod.rs#L61-L63

I'm thinking of using the approach that SliceIndex uses, but there may be better ways.

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