Skip to content

Commit

Permalink
Improve code in web::page::templates::Head struct
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Sep 4, 2024
1 parent 3d156ba commit 9d0dfb7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/web/page/templates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ use tracing::trace;
#[derive(Template)]
#[template(path = "rustdoc/head.html")]
pub struct Head<'a> {
rustdoc_css_file: &'a Option<String>,
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(),
}
}
}
Expand Down

0 comments on commit 9d0dfb7

Please sign in to comment.