@@ -114,7 +114,6 @@ crate fn render<T: Print, S: Print>(
114
114
{after_content}\
115
115
<div id=\" rustdoc-vars\" data-root-path=\" {root_path}\" data-current-crate=\" {krate}\" ></div>
116
116
<script src=\" {static_root_path}main{suffix}.js\" ></script>\
117
- {static_extra_scripts}\
118
117
{extra_scripts}\
119
118
<script defer src=\" {root_path}search-index{suffix}.js\" ></script>\
120
119
</body>\
@@ -135,22 +134,23 @@ crate fn render<T: Print, S: Print>(
135
134
root_path = page. root_path,
136
135
css_class = page. css_class,
137
136
logo = {
138
- let p = format!( "{}{}" , page. root_path, layout. krate) ;
139
- let p = ensure_trailing_slash( & p) ;
140
137
if layout. logo. is_empty( ) {
141
138
format!(
142
- "<a href='{path}index.html'>\
139
+ "<a href='{root}{ path}index.html'>\
143
140
<div class='logo-container rust-logo'>\
144
141
<img src='{static_root_path}rust-logo{suffix}.png' alt='logo'></div></a>",
145
- path = p,
142
+ root = page. root_path,
143
+ path = ensure_trailing_slash( & layout. krate) ,
146
144
static_root_path = static_root_path,
147
145
suffix = page. resource_suffix
148
146
)
149
147
} else {
150
148
format!(
151
- "<a href='{}index.html'>\
152
- <div class='logo-container'><img src='{}' alt='logo'></div></a>",
153
- p, layout. logo
149
+ "<a href='{root}{path}index.html'>\
150
+ <div class='logo-container'><img src='{logo}' alt='logo'></div></a>",
151
+ root = page. root_path,
152
+ path = ensure_trailing_slash( & layout. krate) ,
153
+ logo = layout. logo
154
154
)
155
155
}
156
156
} ,
@@ -194,7 +194,7 @@ crate fn render<T: Print, S: Print>(
194
194
) )
195
195
. collect:: <String >( ) ,
196
196
suffix = page. resource_suffix,
197
- static_extra_scripts = page
197
+ extra_scripts = page
198
198
. static_extra_scripts
199
199
. iter( )
200
200
. map( |e| {
@@ -204,17 +204,13 @@ crate fn render<T: Print, S: Print>(
204
204
extra_script = e
205
205
)
206
206
} )
207
- . collect:: <String >( ) ,
208
- extra_scripts = page
209
- . extra_scripts
210
- . iter( )
211
- . map( |e| {
207
+ . chain( page. extra_scripts. iter( ) . map( |e| {
212
208
format!(
213
209
"<script src=\" {root_path}{extra_script}.js\" ></script>" ,
214
210
root_path = page. root_path,
215
211
extra_script = e
216
212
)
217
- } )
213
+ } ) )
218
214
. collect:: <String >( ) ,
219
215
filter_crates = if layout. generate_search_filter {
220
216
"<select id=\" crate-search\" >\
0 commit comments