From: Scott Worley Date: Mon, 19 Aug 2024 06:13:03 +0000 (-0700) Subject: Separate library & executable X-Git-Tag: v0.2.0~23 X-Git-Url: http://git.scottworley.com/tablify/commitdiff_plain/ece97615567c7bc537f960d1784d652b11c0e66c?ds=sidebyside Separate library & executable --- diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..820f43e --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,3 @@ +pub fn tablify(_input: &impl std::io::Read) -> String { + String::from("Hello, world!") +} diff --git a/src/main.rs b/src/main.rs index e7a11a9..95f468f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,3 @@ fn main() { - println!("Hello, world!"); + print!("{}", tablify::tablify(&std::io::stdin())); }