From 9d0dfb75524732c43b9cd4ad15ab6551fc40828a Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Tue, 27 Aug 2024 11:40:35 +0200 Subject: [PATCH] Improve code in `web::page::templates::Head` struct --- src/web/page/templates.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/web/page/templates.rs b/src/web/page/templates.rs index d7fc09771..b312160d2 100644 --- a/src/web/page/templates.rs +++ b/src/web/page/templates.rs @@ -8,13 +8,13 @@ use tracing::trace; #[derive(Template)] #[template(path = "rustdoc/head.html")] pub struct Head<'a> { - rustdoc_css_file: &'a Option, + rustdoc_css_file: Option<&'a str>, } impl<'a> Head<'a> { pub fn new(inner: &'a RustdocPage) -> Self { Self { - rustdoc_css_file: &inner.metadata.rustdoc_css_file, + rustdoc_css_file: inner.metadata.rustdoc_css_file.as_deref(), } } }