Skip to content

tutorial is wrong about return type of task::try #8343

@bblum

Description

@bblum

http://static.rust-lang.org/doc/tutorial-tasks.html#handling-task-failure

try returns a value of type Result<int, ()>.

It actually returns Result<T, ()> where T is whatever the closure passed to it returns.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions