]> git.scottworley.com Git - tablify/blobdiff - src/lib.rs
in render_row: name 'cells'
[tablify] / src / lib.rs
index 47e1d3a9eb1fa10fac60a16cf66153b55d5d725f..357a7eec0afc72411c76398b124c9cf47d16ed76 100644 (file)
@@ -226,12 +226,12 @@ fn render_cell(col: &str, row: &mut Row) -> HTML {
 
 fn render_row(columns: &[String], row: &mut Row) -> HTML {
     let row_label = HTML::escape(row.label.as_ref());
+    let cells = columns
+        .iter()
+        .map(|col| render_cell(col, row))
+        .collect::<HTML>();
     HTML(format!(
-        "<tr><th id=\"{row_label}\">{row_label}</th>{}</tr>\n",
-        &columns
-            .iter()
-            .map(|col| render_cell(col, row))
-            .collect::<HTML>()
+        "<tr><th id=\"{row_label}\">{row_label}</th>{cells}</tr>\n"
     ))
 }