diff --git a/Cargo.lock b/Cargo.lock index dcd595b5..af66ae27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1237,9 +1237,9 @@ dependencies = [ [[package]] name = "html-page" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95596434766801b2f72a7b1013cc5d8278fad8b4bafee094a22131176b1657df" +checksum = "f4b604f568a3dd058afd11d04f6274112e8504acb545430e26f97a4f79829329" dependencies = [ "html-escape", ] diff --git a/Cargo.toml b/Cargo.toml index 8450e327..88ecaee0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ categories = ["development-tools::build-utils"] [dependencies] clap = { version = "4.5.11", features = ["derive", "wrap_help"] } duration-str = "0.18.0" -html-page = "0.4.0" +html-page = "0.4.2" libc = "0.2.175" nonempty = "0.12.0" radicle = { version = "0.20.0", features = ["default", "test"] } diff --git a/src/pages.rs b/src/pages.rs index 5fcba0e1..b6907ab5 100644 --- a/src/pages.rs +++ b/src/pages.rs @@ -146,7 +146,7 @@ impl PageData { .values() .filter(|run| run.result() == Some(&RunResult::Failure)) .count(); - doc.push(Element::new(Tag::P).with_text(&format!( + doc.push(Element::new(Tag::P).with_text(format!( "Total {total} CI runs recorded, of which {failed} failed." ))); @@ -228,7 +228,7 @@ impl PageData { .with_child( Element::new(Tag::Span) .with_class("repoid") - .with_text(&repo.to_string()), + .with_text(repo.to_string()), ) .with_child(Element::new(Tag::Br)) .with_child(Element::new(Tag::Span).with_class("ref").with_text(refname)) @@ -236,7 +236,7 @@ impl PageData { .with_child( Element::new(Tag::Span) .with_class("commit") - .with_text(&commit.to_string()), + .with_text(commit.to_string()), ) } @@ -299,7 +299,7 @@ impl PageData { table.push_child( Element::new(Tag::Tr) - .with_child(Element::new(Tag::Td).with_text(&event.id().to_string())) + .with_child(Element::new(Tag::Td).with_text(event.id().to_string())) .with_child(Element::new(Tag::Td).with_text(event.timestamp())) .with_child(Element::new(Tag::Td).with_child(event_element)), ); @@ -340,7 +340,7 @@ impl PageData { Element::new(Tag::Span) .with_class(&status) - .with_text(&status.to_string()) + .with_text(status) } fn run_state_unknown() -> Element { @@ -363,10 +363,10 @@ impl PageData { Element::new(Tag::P).with_text("Repository ID ").with_child( Element::new(Tag::Code) .with_class("repoid") - .with_text(&rid.to_string()), + .with_text(rid.to_string()), ), ); - doc.push(Element::new(Tag::P).with_text(&format!("Last updated: {timestamp}"))); + doc.push(Element::new(Tag::P).with_text(format!("Last updated: {timestamp}"))); let mut table = Element::new(Tag::Table).with_class("run-list").with_child( Element::new(Tag::Tr) @@ -448,15 +448,15 @@ impl PageData { .with_class("alias)") .with_text(alias), ) - .with_attribute("href", &format!("{}.html", rid_to_basename(repo_id))), + .with_attribute("href", format!("{}.html", rid_to_basename(repo_id))), ) .with_child(Element::new(Tag::Br)) - .with_child(Element::new(Tag::Span).with_text(&format!( + .with_child(Element::new(Tag::Span).with_text(format!( "{failed} failed runs ({} recently)", failed_recently(&runs, N) ))) .with_child(Element::new(Tag::Br)) - .with_child(Element::new(Tag::Span).with_text(&format!("{total} total runs"))) + .with_child(Element::new(Tag::Span).with_text(format!("{total} total runs"))) } fn run_ids(run: Option<&Run>) -> Element { @@ -479,7 +479,7 @@ impl PageData { Element::new(Tag::Span) .with_class("broker-run-id") .with_text("Broker: ") - .with_text(&run.broker_run_id().to_string()), + .with_text(run.broker_run_id().to_string()), ) .with_child(Element::new(Tag::Br)) .with_child( @@ -493,7 +493,7 @@ impl PageData { Element::new(Tag::Span) .with_class("job-cob-id") .with_text("Job: ") - .with_text(&run.job_id().map(|id| id.to_string()).unwrap_or("".into())), + .with_text(run.job_id().map(|id| id.to_string()).unwrap_or("".into())), ) } else { Element::new(Tag::Span) @@ -528,7 +528,7 @@ impl PageData { .with_child( Element::new(Tag::Code) .with_class("commit)") - .with_text(&commit.to_string()), + .with_text(commit.to_string()), ) .with_child(Element::new(Tag::Br)) .with_text("from ") @@ -547,7 +547,7 @@ impl PageData { .with_child( Element::new(Tag::Code) .with_class("branch") - .with_text(&patch.to_string()), + .with_text(patch.to_string()), ) .with_child(Element::new(Tag::Br)) .with_text("revision ") @@ -563,7 +563,7 @@ impl PageData { .with_child( Element::new(Tag::Code) .with_class("commit)") - .with_text(&commit.to_string()), + .with_text(commit.to_string()), ) .with_child(Element::new(Tag::Br)) .with_text("from ") @@ -822,12 +822,12 @@ impl RssEntry { .with_child( Element::new(Tag::Span) .with_class("repoid") - .with_text(&self.repoid.to_string()), + .with_text(self.repoid.to_string()), ) .with_child( Element::new(Tag::Span) .with_class("commit") - .with_text(&self.commit.to_string()), + .with_text(self.commit.to_string()), ) .with_child( Element::new(Tag::Span) @@ -837,7 +837,7 @@ impl RssEntry { .with_child( Element::new(Tag::Span) .with_class("status") - .with_text(&self.status.to_string()), + .with_text(self.status.to_string()), ) .with_child(Element::new(Tag::Span).with_class("result").with_text( match &self.result {