File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -239,13 +239,6 @@ pub mod filters {
239
239
serde_json:: to_string ( value) . expect ( "`encode_json` failed" ) ,
240
240
) )
241
241
}
242
-
243
- pub fn rest_menu_url ( current_target : & str , inner_path : & str ) -> rinja:: Result < String > {
244
- if current_target. is_empty ( ) {
245
- return Ok ( String :: new ( ) ) ;
246
- }
247
- Ok ( format ! ( "/{current_target}/{inner_path}" ) )
248
- }
249
242
}
250
243
251
244
enum IconType {
Original file line number Diff line number Diff line change 4
4
{%- include "header/topbar_begin.html" -%}
5
5
{%- set crate_url = "/crate/{}/{}"|format(metadata.name, metadata.req_version) -%}
6
6
{%- set rest_menu_url -%}
7
- {%- if current_target is defined -%}
8
- {%- set rest_menu_url = current_target|rest_menu_url( inner_path) -%}
7
+ {%- if current_target is defined && !current_target.is_empty() -%}
8
+ {%- set rest_menu_url = format!("/{}/{}", self.current_target, self. inner_path) -%}
9
9
{%- else -%}
10
- {%- set rest_menu_url = ""|rest_menu_url(inner_path ) -%}
10
+ {%- set rest_menu_url = String::new( ) -%}
11
11
{%- endif -%}
12
12
{%- set platform_menu_url = "{}/menus/platforms{}"|format(crate_url, rest_menu_url) -%}
13
13
{%- set releases_menu_url = "{}/menus/releases{}"|format(crate_url, rest_menu_url) -%}
You can’t perform that action at this time.
0 commit comments