Skip to content

Commit 6fabce6

Browse files
GuillaumeGomezsyphar
authored andcommitted
Remove unneeded unwrap filter
1 parent 4fd0ebe commit 6fabce6

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/web/page/templates.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,6 @@ pub mod filters {
247247
}
248248
}
249249

250-
pub fn unwrap<T: fmt::Display>(value: &Option<T>) -> rinja::Result<&T> {
251-
Ok(value.as_ref().expect("`unwrap` filter failed"))
252-
}
253-
254250
pub fn split_first<'a>(value: &'a str, pat: &str) -> rinja::Result<Option<&'a str>> {
255251
Ok(value.split(pat).next())
256252
}

templates/rustdoc/head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{%- import "macros.html" as macros -%}
2-
<link rel="stylesheet" href="/-/static/{{rustdoc_css_file|unwrap}}?{{ crate::BUILD_VERSION|slugify }}" media="all" />
2+
<link rel="stylesheet" href="/-/static/{{rustdoc_css_file.as_ref().unwrap()}}?{{ crate::BUILD_VERSION|slugify }}" media="all" />
33

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

0 commit comments

Comments
 (0)