From 28cf4fa29f4e47d8b78894fbe86b175e0ab292be Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Wed, 11 Sep 2024 16:09:06 -0700 Subject: [PATCH] Config --- src/lib.rs | 4 +++- src/main.rs | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index b406f95..3e0efd0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,6 +4,8 @@ use std::fmt::Write; use std::io::BufRead; use std::iter::Iterator; +pub struct Config {} + const HEADER: &str = " @@ -252,7 +254,7 @@ fn render_column_headers(columns: &[String]) -> HTML { /// * there's an i/o error while reading `input` /// * the log has invalid syntax: /// * an indented line with no preceding non-indented line -pub fn tablify(input: impl std::io::Read) -> Result { +pub fn tablify(config: &Config, input: impl std::io::Read) -> Result { let rows = read_rows(input).collect::, _>>()?; let columns = column_order(&rows); Ok(HTML(format!( diff --git a/src/main.rs b/src/main.rs index 8cf4859..b4f32fe 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,6 @@ fn main() { - print!("{}", tablify::tablify(std::io::stdin()).unwrap()); + print!( + "{}", + tablify::tablify(&tablify::Config {}, std::io::stdin()).unwrap() + ); } -- 2.44.1