Skip to content

Commit 6c890e2

Browse files
sypharGuillaumeGomez
authored andcommitted
replace unwrap in templates with expect for debugging
1 parent 1943e68 commit 6c890e2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

templates/macros.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@
159159
{%- for dependency in deps -%}
160160
{%- if let serde_json::Value::Array(dep) = dependency -%}
161161
<li class="pure-menu-item">
162-
{%- set first = dep[0].as_str().unwrap() -%}
163-
{%- set second = dep[1].as_str().unwrap() -%}
162+
{%- set first = dep[0].as_str().expect("dep[0] not a string in dependency") -%}
163+
{%- set second = dep[1].as_str().expect("dep[1] not a string in dependency") -%}
164164
<a href="{{ link_prefix|safe }}/{{ first|safe }}/{{ second|safe }}" class="pure-menu-link">
165165
{{ first|safe }} {{ second|safe }}
166166
{% if let Some(serde_json::Value::String(third)) = dep.get(2) %}

templates/rustdoc/head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{%- let build_slug2 = slug::slugify(crate::BUILD_VERSION) -%}
77
{%- endif -%}
88

9-
<link rel="stylesheet" href="/-/static/{{rustdoc_css_file.as_ref().unwrap()}}?{{build_slug2}}" media="all" />
9+
<link rel="stylesheet" href="/-/static/{{rustdoc_css_file.as_ref().expect("rustdoc_css_file missing")}}?{{build_slug2}}" media="all" />
1010
<link rel="stylesheet" href="/-/static/font-awesome.css?{{build_slug2}}" media="all" />
1111

1212
<link rel="search" href="/-/static/opensearch.xml" type="application/opensearchdescription+xml" title="Docs.rs" />

0 commit comments

Comments
 (0)