Radish alpha
r
Radicle CI broker
Radicle
Git (anonymous pull)
Log in to clone via SSH
refactor: create title only once
Lars Wirzenius committed 1 year ago
commit 39b5c0a2fe9c632f05f88467c4007575aa4c4534
parent a34df9980facec6d4cd302a96bc879aa9e5ecdff
1 file changed +3 -9
modified src/pages.rs
@@ -116,16 +116,10 @@ impl PageData {
    fn status_page_as_html(&self) -> Result<HtmlPage, PageError> {
        let mut doc = HtmlPage::default();

-
        Self::head(
-
            &mut doc,
-
            &format!("CI for Radicle node {}", self.node_alias),
-
        );
+
        let title = format!("CI for Radicle node {}", self.node_alias);
+
        Self::head(&mut doc, &title);

-
        doc.push_to_body(
-
            Element::new(Tag::H1)
-
                .with_text("CI for Radicle node ")
-
                .with_text(&self.node_alias),
-
        );
+
        doc.push_to_body(Element::new(Tag::H1).with_text(&title));

        doc.push_to_body(Element::new(Tag::H2).with_text("Broker status"));
        doc.push_to_body(