aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index b7fbd08..135e0c5 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,4 +1,33 @@
+use std::io::{self, BufRead};
+// use std::io::Read;
+
fn main() {
+ // let mut input = String::new();
+ // io::stdin().read_to_end(&mut input).unwrap();
+ // .expect("Failed to read STDIN");
+
+ // match io::stdin().lock() {
+ // Ok(s) => s.read_to_string(&mut input),
+ // Err(e) => panic!("Error: {}", e),
+ // }
+
+ // let stdin = io::stdin();
+ // for line in stdin.lock().lines() {
+ // input.push_str(&line.unwrap());
+ // }
+
+ // let stdin = io::stdin();
+ // loop {
+ // stdin.read_line(&mut input).expect("asdf");
+ // }
+
+ let stdin = io::stdin();
+ let input: Vec<String> = stdin.lock().lines().map(|line| line.unwrap()).collect();
+
+ for l in &input {
+ println!("{}", l);
+ }
+
// if alias not new
// do nothing
// if alias is new