File tree Expand file tree Collapse file tree 2 files changed +5
-17
lines changed
Expand file tree Collapse file tree 2 files changed +5
-17
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ struct RustdocPage {
2424 pub head : String ,
2525 pub body : String ,
2626 pub name : String ,
27+ pub full : String ,
2728 pub version : String ,
2829 pub description : Option < String > ,
2930 pub crate_details : Option < CrateDetails > ,
@@ -36,6 +37,7 @@ impl Default for RustdocPage {
3637 head : String :: new ( ) ,
3738 body : String :: new ( ) ,
3839 name : String :: new ( ) ,
40+ full : String :: new ( ) ,
3941 version : String :: new ( ) ,
4042 description : None ,
4143 crate_details : None ,
@@ -49,6 +51,7 @@ impl ToJson for RustdocPage {
4951 let mut m: BTreeMap < String , Json > = BTreeMap :: new ( ) ;
5052 m. insert ( "rustdoc_head" . to_string ( ) , self . head . to_json ( ) ) ;
5153 m. insert ( "rustdoc_body" . to_string ( ) , self . body . to_json ( ) ) ;
54+ m. insert ( "rustdoc_full" . to_string ( ) , self . full . to_json ( ) ) ;
5255 m. insert ( "rustdoc_status" . to_string ( ) , true . to_json ( ) ) ;
5356 m. insert ( "name" . to_string ( ) , self . name . to_json ( ) ) ;
5457 m. insert ( "version" . to_string ( ) , self . version . to_json ( ) ) ;
@@ -177,6 +180,7 @@ pub fn rustdoc_html_server_handler(req: &mut Request) -> IronResult<Response> {
177180 }
178181 }
179182
183+ content. full = file_content;
180184 let crate_details = cexpect ! ( CrateDetails :: new( & conn, & name, & version) ) ;
181185 let latest_version = latest_version ( & crate_details. versions , & version) ;
182186
Original file line number Diff line number Diff line change 1- <!DOCTYPE html>
2- <html lang =" en" >
3- <head >
4- {{{ content.rustdoc_head }}}
5- <link rel =" stylesheet" href =" https://cdnjs.cloudflare.com/ajax/libs/pure/0.6.0/menus-min.css" type =" text/css" media =" all" />
6- <link rel =" stylesheet" href =" https://cdnjs.cloudflare.com/ajax/libs/pure/0.6.0/grids-min.css" type =" text/css" media =" all" />
7- <link rel =" stylesheet" href =" https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" type =" text/css" media =" all" />
8- <link rel =" stylesheet" href =" /style.css?{{ cratesfyi_version_safe }} " type =" text/css" media =" all" />
9- <link rel =" search" href =" /opensearch.xml" type =" application/opensearchdescription+xml" title =" Docs.rs" >
10- </head >
11- <body >
12- {{> navigation_rustdoc }}
13- <div class =" rustdoc container-rustdoc" >
14- {{{ content.rustdoc_body }}}
15- </div >
16- </body >
17- </html >
1+ {{{ content.rustdoc_full }}}
You can’t perform that action at this time.
0 commit comments