chiark / gitweb /
html: Fix hjoin
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 31 Mar 2021 19:26:04 +0000 (20:26 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 31 Mar 2021 19:26:04 +0000 (20:26 +0100)
Practical effect is to fix the formatting of the Links table.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/html.rs

index 4c7f9b743c0e21966ec2726f6acca46357bfa884..20f3b13061c1720e1a69f6c838a17996dc07b7df 100644 (file)
@@ -112,9 +112,10 @@ impl<T:Iterator> T {
   {
     let j: &HtmlStr = j.as_ref();
     Html::from_html_string(
-      self
-        .map(|h| h.as_ref().as_html_str())
-        .zip( iter::once("").chain(iter::repeat(j.as_html_str())) )
+      izip!(
+        iter::once("").chain(iter::repeat(j.as_html_str())),
+        self.map(|h| h.as_ref().as_html_str()),
+      )
         .map(|(a,b)| iter::once(a).chain(iter::once(b)))
         .flatten()
         .collect::<String>()