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 {
24
24
pub head : String ,
25
25
pub body : String ,
26
26
pub name : String ,
27
+ pub full : String ,
27
28
pub version : String ,
28
29
pub description : Option < String > ,
29
30
pub crate_details : Option < CrateDetails > ,
@@ -36,6 +37,7 @@ impl Default for RustdocPage {
36
37
head : String :: new ( ) ,
37
38
body : String :: new ( ) ,
38
39
name : String :: new ( ) ,
40
+ full : String :: new ( ) ,
39
41
version : String :: new ( ) ,
40
42
description : None ,
41
43
crate_details : None ,
@@ -49,6 +51,7 @@ impl ToJson for RustdocPage {
49
51
let mut m: BTreeMap < String , Json > = BTreeMap :: new ( ) ;
50
52
m. insert ( "rustdoc_head" . to_string ( ) , self . head . to_json ( ) ) ;
51
53
m. insert ( "rustdoc_body" . to_string ( ) , self . body . to_json ( ) ) ;
54
+ m. insert ( "rustdoc_full" . to_string ( ) , self . full . to_json ( ) ) ;
52
55
m. insert ( "rustdoc_status" . to_string ( ) , true . to_json ( ) ) ;
53
56
m. insert ( "name" . to_string ( ) , self . name . to_json ( ) ) ;
54
57
m. insert ( "version" . to_string ( ) , self . version . to_json ( ) ) ;
@@ -177,6 +180,7 @@ pub fn rustdoc_html_server_handler(req: &mut Request) -> IronResult<Response> {
177
180
}
178
181
}
179
182
183
+ content. full = file_content;
180
184
let crate_details = cexpect ! ( CrateDetails :: new( & conn, & name, & version) ) ;
181
185
let latest_version = latest_version ( & crate_details. versions , & version) ;
182
186
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