Skip to content

Commit 3bf482c

Browse files
oddgrdseanmonstar
authored andcommitted
fix: incorrect links in 0.14 guides
0.14 guides were linking to `master` for examples and `1.0` for docs
1 parent dd0cf4d commit 3bf482c

File tree

8 files changed

+16
-12
lines changed

8 files changed

+16
-12
lines changed

_config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,6 @@ docs_url: https://docs.rs/hyper/1.0.0-rc.1
4646
examples_url: https://github.com/hyperium/hyper/tree/master/examples
4747
futures_url: https://docs.rs/futures/0.3.*
4848
hyper_tls_url: https://docs.rs/hyper-tls/*
49+
50+
legacy_docs_url: https://docs.rs/hyper/0.14.23
51+
legacy_examples_url: https://github.com/hyperium/hyper/tree/0.14.x/examples

_guides/client/advanced.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,5 @@ let (ip, headers) = futures::try_join!(ip_fut, headers_fut)?;
110110
```
111111

112112
[simple guide]: ./basic.md
113-
[Request]: {{ site.docs_url }}/hyper/struct.Request.html
114-
[Method]: {{ site.docs_url }}/hyper/struct.Method.html
113+
[Request]: {{ site.legacy_docs_url }}/hyper/struct.Request.html
114+
[Method]: {{ site.legacy_docs_url }}/hyper/struct.Method.html

_guides/client/basic.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ while let Some(chunk) = resp.body_mut().data().await {
112112

113113
And that's it! You can see the [full example here][example].
114114

115-
[Client]: {{ site.docs_url }}/hyper/client/struct.Client.html
115+
[Client]: {{ site.legacy_docs_url }}/hyper/client/struct.Client.html
116116
[Tokio]: https://tokio.rs
117117
[Tokio-Futures]: https://tokio.rs/tokio/tutorial/async
118-
[StatusCode]: {{ site.docs_url }}/hyper/struct.StatusCode.html
119-
[Response]: {{ site.docs_url }}/hyper/struct.Response.html
120-
[example]: {{ site.examples_url }}/client.rs
118+
[StatusCode]: {{ site.legacy_docs_url }}/hyper/struct.StatusCode.html
119+
[Response]: {{ site.legacy_docs_url }}/hyper/struct.Response.html
120+
[example]: {{ site.legacy_examples_url }}/client.rs

_guides/client/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ ideas of things that could be connectors:
3939
- Proxies
4040
- In-memory streams (such as for testing)
4141

42-
[`Client`]: {{ site.docs_url }}/hyper/client/struct.Client.html
42+
[`Client`]: {{ site.legacy_docs_url }}/hyper/client/struct.Client.html
4343
[hyper-tls]: {{ site.hyper_tls_url }}

_guides/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ hyper = "0.14"
1818

1919
You could also look at the [generated API documentaton][docs].
2020

21-
[docs]: {{ site.docs_url }}
21+
[docs]: {{ site.legacy_docs_url }}
2222
[Server guide]: server/hello-world.md
2323
[Client guide]: client/basic.md

_guides/server/echo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,5 +197,5 @@ We want to concatenate the request body, and map the result into our `reverse` f
197197

198198
You can see a compiling [example here][example].
199199

200-
[example]: {{ site.examples_url }}/echo.rs
200+
[example]: {{ site.legacy_examples_url }}/echo.rs
201201
[future-crate]: https://github.com/rust-lang-nursery/futures-rs

_guides/server/hello-world.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,5 @@ async fn main() {
9494

9595
To see all the snippets put together, check out the [full example][example]!
9696

97-
[service]: {{ site.docs_url }}/hyper/service/trait.Service.html
98-
[example]: {{ site.examples_url }}/hello.rs
97+
[service]: {{ site.legacy_docs_url }}/hyper/service/trait.Service.html
98+
[example]: {{ site.legacy_examples_url }}/hello.rs

_stable/server/echo.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ async fn echo(
5454
))),
5555
(&Method::POST, "/echo") => {
5656
// we'll be back
57-
# Ok(Response::new(req.into_body().boxed()))
57+
# Ok(Response::new(req.into_body().boxed()))
5858
},
5959

6060
// Return 404 Not Found for other routes.
@@ -65,6 +65,7 @@ async fn echo(
6565
}
6666
}
6767
}
68+
6869
// We create some utility functions to make Empty and Full bodies
6970
// fit our broadened Response body type.
7071
fn empty() -> BoxBody<Bytes, hyper::Error> {

0 commit comments

Comments
 (0)