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 {
239239 serde_json:: to_string ( value) . expect ( "`encode_json` failed" ) ,
240240 ) )
241241 }
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- }
249242}
250243
251244enum IconType {
Original file line number Diff line number Diff line change 44{%- include "header/topbar_begin.html" -%}
55{%- set crate_url = "/crate/{}/{}"|format(metadata.name, metadata.req_version) -%}
66{%- 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) -%}
99{%- else -%}
10- {%- set rest_menu_url = ""|rest_menu_url(inner_path ) -%}
10+ {%- set rest_menu_url = String::new( ) -%}
1111{%- endif -%}
1212{%- set platform_menu_url = "{}/menus/platforms{}"|format(crate_url, rest_menu_url) -%}
1313{%- set releases_menu_url = "{}/menus/releases{}"|format(crate_url, rest_menu_url) -%}
You can’t perform that action at this time.
0 commit comments