}
}
+const DEFAULT_CONFIG: Config = Config {
+ column_threshold: 2,
+ static_columns: vec![],
+};
+
const HEADER: &str = r#"<!DOCTYPE html>
<html>
<head>
}
fn read_input(input: impl std::io::Read) -> Result<(Vec<Rowlike>, Config), std::io::Error> {
- let mut config = Config {
- column_threshold: 2,
- static_columns: vec![],
- };
+ let mut config = DEFAULT_CONFIG;
let reader = Reader::new(&mut config, std::io::BufReader::new(input).lines());
reader
.collect::<Result<Vec<_>, _>>()
fn test_render_row() {
assert_eq!(
render_row(
- &Config {
- column_threshold: 0,
- static_columns: vec![],
- },
+ &DEFAULT_CONFIG,
&["foo".to_owned()],
&mut Rowlike::Row(Row {
label: "nope".to_owned(),