Skip to content

Core::spawn should expect Error=Void not Error=() #197

@Rufflewind

Description

@Rufflewind

Since spawn never looks at the results of the future, the return value ought to be completely devoid of any useful information to reduce the risk that the user might unintentionally forget about the result.

The current choice of Future<Item=(), Error=()> still has one bit of information: it’s possible to distinguish between Ok(()) and Err(()) results. It really ought to return Future<Item=(), Error=Void>, which means the Future is guaranteed to succeed.

It’s not a big problem by any means, just kind of quirky in my perspective.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions