]> git.scottworley.com Git - tablify/commitdiff
Separate library & executable
authorScott Worley <scottworley@scottworley.com>
Mon, 19 Aug 2024 06:13:03 +0000 (23:13 -0700)
committerScott Worley <scottworley@scottworley.com>
Mon, 19 Aug 2024 06:13:03 +0000 (23:13 -0700)
src/lib.rs [new file with mode: 0644]
src/main.rs

diff --git a/src/lib.rs b/src/lib.rs
new file mode 100644 (file)
index 0000000..820f43e
--- /dev/null
@@ -0,0 +1,3 @@
+pub fn tablify(_input: &impl std::io::Read) -> String {
+    String::from("Hello, world!")
+}
index e7a11a969c037e00a796aafeff6258501ec15e9a..95f468f340062c024fee774b0fbe7d97794d4120 100644 (file)
@@ -1,3 +1,3 @@
 fn main() {
 fn main() {
-    println!("Hello, world!");
+    print!("{}", tablify::tablify(&std::io::stdin()));
 }
 }