@@ -221,7 +221,7 @@ pub fn rustdoc_html_server_handler(req: &mut Request) -> IronResult<Response> {
221
221
router. find ( "version" ) ,
222
222
) ;
223
223
224
- let conn = extension ! ( req, Pool ) . get ( ) ;
224
+ let conn = extension ! ( req, Pool ) . get ( ) ? ;
225
225
let mut req_path = req. url . path ( ) ;
226
226
227
227
// Remove the name and version from the path
@@ -323,7 +323,7 @@ pub fn rustdoc_html_server_handler(req: &mut Request) -> IronResult<Response> {
323
323
}
324
324
325
325
// 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 ( ) ;
327
327
let is_latest_version = latest_version == version;
328
328
329
329
// 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> {
368
368
. set_true ( "package_navigation_documentation_tab" )
369
369
. set_true ( "package_navigation_show_platforms_tab" )
370
370
. set_bool ( "is_latest_version" , is_latest_version)
371
- . set ( "latest_path" , & latest_path )
371
+ . set ( "latest_path" , & path_in_latest )
372
372
. set ( "latest_version" , & latest_version)
373
373
. set ( "inner_path" , & inner_path)
374
374
. to_resp ( "rustdoc" )
0 commit comments