fn render_instance(entry: &Entry) -> String {
match &entry.instance {
- None => String::from("✓ "),
- Some(instance) => String::from(instance) + " ",
+ None => String::from("✓"),
+ Some(instance) => String::from(instance),
}
}
entries
.iter()
.map(|i| render_instance(i))
- .collect::<String>()
+ .collect::<Vec<_>>()
+ .join(" ")
};
- format!("<td class=\"{class}\" onmouseover=\"h2('{row_label}','{col}')\" onmouseout=\"ch2('{row_label}','{col}')\">{}</td>", contents.trim())
+ format!("<td class=\"{class}\" onmouseover=\"h2('{row_label}','{col}')\" onmouseout=\"ch2('{row_label}','{col}')\">{contents}</td>")
}
fn render_row(columns: &[String], row: &RowInput) -> String {