Skip to content

Bug in impl FusedFuture for futures::future::Map #2213

Closed
@Nemo157

Description

@Nemo157

It doesn't correctly propagate the termination of the underlying future

use futures::future::FusedFuture;
use futures::future::FutureExt;

fn main() {
    assert!(futures::future::pending::<()>().is_terminated());
    assert!(futures::future::pending::<()>().map(|()| ()).is_terminated());
}
> cargo run
thread 'main' panicked at 'assertion failed: futures::future::pending::<()>().map(|()| ()).is_terminated()', src/main.rs:6:5

This should be delegating through to the inner future:

Map::Incomplete { .. } => false,

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions