diff --git a/src/web/page/templates.rs b/src/web/page/templates.rs index c648be86e..3145fb3ab 100644 --- a/src/web/page/templates.rs +++ b/src/web/page/templates.rs @@ -92,7 +92,6 @@ pub mod filters { use chrono::{DateTime, Utc}; use rinja::filters::Safe; use std::borrow::Cow; - use std::fmt; // Copied from `tera`. pub fn escape_html(input: &str) -> rinja::Result> { @@ -251,10 +250,6 @@ pub mod filters { Ok(value.split(pat).next()) } - pub fn to_string(value: &T) -> rinja::Result { - Ok(value.to_string()) - } - pub fn json_encode(value: &T) -> rinja::Result { Ok(serde_json::to_string(value).expect("`encode_json` failed")) } diff --git a/templates/rustdoc/topbar.html b/templates/rustdoc/topbar.html index 6e4eb116f..7eb80f079 100644 --- a/templates/rustdoc/topbar.html +++ b/templates/rustdoc/topbar.html @@ -36,7 +36,7 @@ {%- include "clipboard.svg" -%} - {%- if metadata.req_version|to_string == "latest" -%} + {%- if metadata.req_version.to_string() == "latest" -%}