Skip to content

Bug in Chain-based future's implementations of FusedFuture #2118

@Diggsey

Description

@Diggsey

return unsafe { Pin::new_unchecked(fut2) }.poll(cx);

As you can see, once the second future returns ready it will return immediately without first transitioning to the Empty state, which is what the is_terminated function looks at:

pub(crate)fn is_terminated(&self) -> bool {
if let Chain::Empty = *self { true } else { 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