Skip to content

Commit 6cdb8d6

Browse files
authored
Merge pull request rust-lang#42 from SimonSapin/patch-4
Fix links to promise function vs Promise type
2 parents aef0baa + 236c35e commit 6cdb8d6

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

TUTORIAL.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -820,15 +820,16 @@ and is used to complete the promise, providing a value to the future on the
820820
other end. The [`Complete::complete`] method will transmit the value to the
821821
receiving end.
822822

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

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

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

0 commit comments

Comments
 (0)