Skip to content

Commit 14980a1

Browse files
KixironJoshua Nelson
authored andcommitted
Cleaned up from rebase
1 parent 509a0bc commit 14980a1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/web/rustdoc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ pub fn rustdoc_html_server_handler(req: &mut Request) -> IronResult<Response> {
221221
router.find("version"),
222222
);
223223

224-
let conn = extension!(req, Pool).get();
224+
let conn = extension!(req, Pool).get()?;
225225
let mut req_path = req.url.path();
226226

227227
// Remove the name and version from the path
@@ -323,7 +323,7 @@ pub fn rustdoc_html_server_handler(req: &mut Request) -> IronResult<Response> {
323323
}
324324

325325
// Get the latest version of the crate
326-
let latest_version = crate_details.latest_version().to_owned();
326+
let latest_version = crate_details.latest_release().version.to_owned();
327327
let is_latest_version = latest_version == version;
328328

329329
// If the requested version is not the latest, then find the path of the latest version for the `Go to latest` link
@@ -368,7 +368,7 @@ pub fn rustdoc_html_server_handler(req: &mut Request) -> IronResult<Response> {
368368
.set_true("package_navigation_documentation_tab")
369369
.set_true("package_navigation_show_platforms_tab")
370370
.set_bool("is_latest_version", is_latest_version)
371-
.set("latest_path", &latest_path)
371+
.set("latest_path", &path_in_latest)
372372
.set("latest_version", &latest_version)
373373
.set("inner_path", &inner_path)
374374
.to_resp("rustdoc")

0 commit comments

Comments
 (0)