Skip to content

Commit 837604b

Browse files
authored
Merge pull request #542 from yjhmelody/update-doc
update doc url
2 parents c4ba11f + 74caed2 commit 837604b

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

docs/src/overview/std-and-library-futures.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ Rust has two kinds of types commonly referred to as `Future`:
44

55

66
- the first is `std::future::Future` from Rust’s [standard library](https://doc.rust-lang.org/std/future/trait.Future.html).
7-
- the second is `futures::future::Future` from the [futures-rs crate](https://docs.rs/futures-preview/0.3.0-alpha.17/futures/prelude/trait.Future.html), currently released as `futures-preview`.
7+
- the second is `futures::future::Future` from the [futures-rs crate](https://docs.rs/futures/0.3/futures/prelude/trait.Future.html).
88

9-
The future defined in the [futures-rs](https://docs.rs/futures-preview/0.3.0-alpha.17/futures/prelude/trait.Future.html) crate was the original implementation of the type. To enable the `async/await` syntax, the core Future trait was moved into Rust’s standard library and became `std::future::Future`. In some sense, the `std::future::Future` can be seen as a minimal subset of `futures::future::Future`.
9+
The future defined in the [futures-rs](https://docs.rs/futures/0.3/futures/prelude/trait.Future.html) crate was the original implementation of the type. To enable the `async/await` syntax, the core Future trait was moved into Rust’s standard library and became `std::future::Future`. In some sense, the `std::future::Future` can be seen as a minimal subset of `futures::future::Future`.
1010

11-
It is critical to understand the difference between `std::future::Future` and `futures::future::Future`, and the approach that `async-std` takes towards them. In itself, `std::future::Future` is not something you want to interact with as a user—except by calling `.await` on it. The inner workings of `std::future::Future` are mostly of interest to people implementing `Future`. Make no mistake—this is very useful! Most of the functionality that used to be defined on `Future` itself has been moved to an extension trait called [`FuturesExt`](https://docs.rs/futures-preview/0.3.0-alpha.17/futures/future/trait.FutureExt.html). From this information, you might be able to infer that the `futures` library serves as an extension to the core Rust async features.
11+
It is critical to understand the difference between `std::future::Future` and `futures::future::Future`, and the approach that `async-std` takes towards them. In itself, `std::future::Future` is not something you want to interact with as a user—except by calling `.await` on it. The inner workings of `std::future::Future` are mostly of interest to people implementing `Future`. Make no mistake—this is very useful! Most of the functionality that used to be defined on `Future` itself has been moved to an extension trait called [`FuturesExt`](https://docs.rs/futures/0.3/futures/future/trait.FutureExt.html). From this information, you might be able to infer that the `futures` library serves as an extension to the core Rust async features.
1212

1313
In the same tradition as `futures`, `async-std` re-exports the core `std::future::Future` type. You can actively opt into the extensions provided by the `futures-preview` crate by adding it to your `Cargo.toml` and importing `FuturesExt`.
1414

src/io/buf_read/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ extension_trait! {
3434
3535
[`std::io::BufRead`]: https://doc.rust-lang.org/std/io/trait.BufRead.html
3636
[`futures::io::AsyncBufRead`]:
37-
https://docs.rs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncBufRead.html
37+
https://docs.rs/futures/0.3/futures/io/trait.AsyncBufRead.html
3838
[provided methods]: #provided-methods
3939
[`BufReadExt`]: ../io/prelude/trait.BufReadExt.html
4040
[prelude]: ../prelude/index.html

src/io/read/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ extension_trait! {
4040
4141
[`std::io::Read`]: https://doc.rust-lang.org/std/io/trait.Read.html
4242
[`futures::io::AsyncRead`]:
43-
https://docs.rs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncRead.html
43+
https://docs.rs/futures/0.3/futures/io/trait.AsyncRead.html
4444
[`poll_read`]: #tymethod.poll_read
4545
[`poll_read_vectored`]: #method.poll_read_vectored
4646
[`ReadExt`]: ../io/prelude/trait.ReadExt.html

src/io/seek/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extension_trait! {
2727
2828
[`std::io::Seek`]: https://doc.rust-lang.org/std/io/trait.Seek.html
2929
[`futures::io::AsyncSeek`]:
30-
https://docs.rs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncSeek.html
30+
https://docs.rs/futures/0.3/futures/io/trait.AsyncSeek.html
3131
[provided methods]: #provided-methods
3232
[`SeekExt`]: ../io/prelude/trait.SeekExt.html
3333
[prelude]: ../prelude/index.html

src/io/write/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ extension_trait! {
3535
3636
[`std::io::Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
3737
[`futures::io::AsyncWrite`]:
38-
https://docs.rs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncWrite.html
38+
https://docs.rs/futures/0.3/futures/io/trait.AsyncWrite.html
3939
[`poll_write`]: #tymethod.poll_write
4040
[`poll_write_vectored`]: #method.poll_write_vectored
4141
[`poll_flush`]: #tymethod.poll_flush

src/net/tcp/stream.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ use crate::task::{spawn_blocking, Context, Poll};
2222
/// [`connect`]: struct.TcpStream.html#method.connect
2323
/// [accepting]: struct.TcpListener.html#method.accept
2424
/// [listener]: struct.TcpListener.html
25-
/// [`AsyncRead`]: https://docs.rs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncRead.html
26-
/// [`AsyncWrite`]: https://docs.rs/futures-preview/0.3.0-alpha.17/futures/io/trait.AsyncWrite.html
27-
/// [`futures::io`]: https://docs.rs/futures-preview/0.3.0-alpha.17/futures/io/index.html
25+
/// [`AsyncRead`]: https://docs.rs/futures/0.3/futures/io/trait.AsyncRead.html
26+
/// [`AsyncWrite`]: https://docs.rs/futures/0.3/futures/io/trait.AsyncWrite.html
27+
/// [`futures::io`]: https://docs.rs/futures/0.3/futures/io/index.html
2828
/// [`shutdown`]: struct.TcpStream.html#method.shutdown
2929
/// [`std::net::TcpStream`]: https://doc.rust-lang.org/std/net/struct.TcpStream.html
3030
///

src/stream/stream/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ extension_trait! {
157157
158158
[`std::iter::Iterator`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html
159159
[`futures::stream::Stream`]:
160-
https://docs.rs/futures-preview/0.3.0-alpha.17/futures/stream/trait.Stream.html
160+
https://docs.rs/futures/0.3/futures/stream/trait.Stream.html
161161
[provided methods]: #provided-methods
162162
[`StreamExt`]: ../prelude/trait.StreamExt.html
163163
[prelude]: ../prelude/index.html

0 commit comments

Comments
 (0)