Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bblum opened this issue Aug 6, 2013 · 0 comments
Closed

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

bblum opened this issue Aug 6, 2013 · 0 comments
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@bblum
Copy link
Contributor

bblum commented Aug 6, 2013

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.

@bors bors closed this as completed in 3073ba4 Sep 24, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue Jan 27, 2022
Autofocus search input

changelog: autofocus filter input on Clippy Lints page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

1 participant