Skip to content

Commit

Permalink
Merge pull request rust-lang#42 from SimonSapin/patch-4
Browse files Browse the repository at this point in the history
Fix links to promise function vs Promise type
  • Loading branch information
alexcrichton committed Aug 11, 2016
2 parents aef0baa + 236c35e commit 6cdb8d6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions TUTORIAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -820,15 +820,16 @@ and is used to complete the promise, providing a value to the future on the
other end. The [`Complete::complete`] method will transmit the value to the
receiving end.

The second half, `rx` ("receiver"), is of type [`Promise`] which is a type that
implements the [`Future`] trait. The `Item` type is `T`, the type of the promise.
The second half, `rx` ("receiver"), is of type [`Promise`][promise-type] which is
a type that implements the [`Future`] trait. The `Item` type is `T`, the type of
the promise.
The `Error` type is [`Canceled`], which happens when the [`Complete`] half is
dropped without completing the computation.

[`mpsc::channel`]: https://doc.rust-lang.org/std/sync/mpsc/fn.channel.html
[`Complete`]: http://alexcrichton.com/futures-rs/futures/struct.Complete.html
[`Complete::complete`]: http://alexcrichton.com/futures-rs/futures/struct.Complete.html#method.complete
[`Promise`]: http://alexcrichton.com/futures-rs/futures/struct.Promise.html
[promise-type]: http://alexcrichton.com/futures-rs/futures/struct.Promise.html
[`Canceled`]: http://alexcrichton.com/futures-rs/futures/struct.Canceled.html

This concrete implementation of `Future` can be used (as shown here) to
Expand Down

0 comments on commit 6cdb8d6

Please sign in to comment.