Skip to content

Commit

Permalink
Add a route for scrape-examples-help.html. Fixes #1960.
Browse files Browse the repository at this point in the history
  • Loading branch information
willcrichton authored and jyn514 committed Dec 18, 2022
1 parent 83e9000 commit 66acb49
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/web/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ pub(super) fn build_routes() -> Routes {
"/:crate/:version/settings.html",
super::rustdoc::rustdoc_html_server_handler,
);
routes.rustdoc_page(
"/:crate/:version/scrape-examples-help.html",
super::rustdoc::rustdoc_html_server_handler,
);
routes.rustdoc_page(
"/:crate/:version/all.html",
super::rustdoc::rustdoc_html_server_handler,
Expand Down
7 changes: 7 additions & 0 deletions src/web/rustdoc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,7 @@ mod test {
.version("0.1.0")
.archive_storage(archive_storage)
.rustdoc_file("settings.html")
.rustdoc_file("scrape-examples-help.html")
.rustdoc_file("directory_1/index.html")
.rustdoc_file("directory_2.html/index.html")
.rustdoc_file("all.html")
Expand Down Expand Up @@ -977,6 +978,12 @@ mod test {
CachePolicy::ForeverInCdnAndStaleInBrowser,
&env.config(),
)?;
assert_success_cached(
"/buggy/0.1.0/scrape-examples-help.html",
web,
CachePolicy::ForeverInCdnAndStaleInBrowser,
&env.config(),
)?;
assert_success_cached(
"/buggy/0.1.0/all.html",
web,
Expand Down

0 comments on commit 66acb49

Please sign in to comment.