Skip to content

Commit 382f717

Browse files
authored
Merge pull request rust-lang#281 from theduke/patch-1
Fix most of the doc links in Tutorial
2 parents dcf960a + 291aca8 commit 382f717

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

TUTORIAL.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Here we're adding a dependency on three crates:
6868
[`mio`]: https://crates.io/crates/mio
6969
[`tokio-core`]: https://github.com/tokio-rs/tokio-core
7070
[`tokio-tls`]: https://github.com/tokio-rs/tokio-tls
71-
[`Future`]: https://docs.rs/futures/0.1/futures/trait.Future.html
71+
[`Future`]: https://docs.rs/futures/0.1/futures/future/trait.Future.html
7272
[`Stream`]: https://docs.rs/futures/0.1/futures/stream/trait.Stream.html
7373
[Tokio]: https://github.com/tokio-rs/tokio
7474

@@ -176,7 +176,7 @@ takes a closure which receives the resolved value of this previous future. In
176176
this case `socket` will have type [`TcpStream`]. The [`and_then`] closure,
177177
however, will not run if [`TcpStream::connect`] returned an error.
178178

179-
[`and_then`]: https://docs.rs/futures/0.1/futures/trait.Future.html#method.and_then
179+
[`and_then`]: https://docs.rs/futures/0.1/futures/future/trait.Future.html#method.and_then
180180
[`TcpStream`]: https://tokio-rs.github.io/tokio-core/tokio_core/net/struct.TcpStream.html
181181

182182
Once we have our `socket`, we create a client TLS context via
@@ -357,7 +357,7 @@ method directly. Rather, you interact with futures through [combinators] that
357357
create higher-level abstractions around futures. But it's useful to our
358358
understanding if we have a sense of how futures work under the hood.
359359

360-
[`poll`]: https://docs.rs/futures/0.1/futures/trait.Future.html#tymethod.poll
360+
[`poll`]: https://docs.rs/futures/0.1/futures/future/trait.Future.html#tymethod.poll
361361

362362
Let's take a closer look at [`poll`]. Notice the `&mut self` argument, which
363363
conveys a number of restrictions and abilities:
@@ -455,14 +455,14 @@ The combinators on futures allow expressing concepts like:
455455

456456
[`Iterator`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html
457457
[`Box`]: https://doc.rust-lang.org/std/boxed/struct.Box.html
458-
[`map`]: https://docs.rs/futures/0.1/futures/trait.Future.html#method.map
459-
[`map_err`]: https://docs.rs/futures/0.1/futures/trait.Future.html#method.map_err
460-
[`then`]: https://docs.rs/futures/0.1/futures/trait.Future.html#method.then
461-
[`and_then`]: https://docs.rs/futures/0.1/futures/trait.Future.html#method.and_then
462-
[`or_else`]: https://docs.rs/futures/0.1/futures/trait.Future.html#method.or_else
463-
[`select`]: https://docs.rs/futures/0.1/futures/trait.Future.html#method.select
464-
[`join`]: https://docs.rs/futures/0.1/futures/trait.Future.html#method.join
465-
[`fuse`]: https://docs.rs/futures/0.1/futures/trait.Future.html#method.fuse
458+
[`map`]: https://docs.rs/futures/0.1/futures/future/trait.Future.html#method.map
459+
[`map_err`]: https://docs.rs/futures/0.1/futures/future/trait.Future.html#method.map_err
460+
[`then`]: https://docs.rs/futures/0.1/futures/future/trait.Future.html#method.then
461+
[`and_then`]: https://docs.rs/futures/0.1/futures/future/trait.Future.html#method.and_then
462+
[`or_else`]: https://docs.rs/futures/0.1/futures/future/trait.Future.html#method.or_else
463+
[`select`]: https://docs.rs/futures/0.1/futures/future/trait.Future.html#method.select
464+
[`join`]: https://docs.rs/futures/0.1/futures/future/trait.Future.html#method.join
465+
[`fuse`]: https://docs.rs/futures/0.1/futures/future/trait.Future.html#method.fuse
466466

467467
Usage of the combinators should feel very similar to the [`Iterator`] trait in
468468
Rust or [futures in Scala][scala-futures]. Most composition of futures ends up
@@ -715,7 +715,7 @@ In situations though where a value isn't immediately ready, there are also
715715
more general implementations of [`Future`] and [`Stream`] that are available in
716716
the [`futures`] crate, the first of which is [`oneshot`]. Let's take a look:
717717

718-
[`oneshot`]: https://docs.rs/futures/0.1/futures/fn.oneshot.html
718+
[`oneshot`]: https://docs.rs/futures/0.1/futures/sync/fn.oneshot.html
719719

720720
```rust
721721
extern crate futures;
@@ -827,7 +827,7 @@ generally introduce allocations), it's only at the fringe that a `Box` comes
827827
into effect.
828828

829829
[trait object]: https://doc.rust-lang.org/book/trait-objects.html
830-
[`boxed`]: https://docs.rs/futures/0.1/futures/trait.Future.html#method.boxed
830+
[`boxed`]: https://docs.rs/futures/0.1/futures/future/trait.Future.html#method.boxed
831831

832832
### Custom types
833833
[return-custom-types]: #custom-types
@@ -894,7 +894,7 @@ Sometimes the types can get quite large or be unnameable altogether. Here we're
894894
using a function pointer (`fn(i32) -> i32`) but we would ideally use a closure.
895895
Unfortunately the return type cannot name the closure, for now.
896896

897-
[`Map`]: https://docs.rs/futures/0.1/futures/struct.Map.html
897+
[`Map`]: https://docs.rs/futures/0.1/futures/future/struct.Map.html
898898

899899
### `impl Trait`
900900
[return-impl-trait]: #impl-trait

0 commit comments

Comments
 (0)