diff options
Diffstat (limited to 'aoc11')
-rw-r--r-- | aoc11/Cargo.toml | 7 | ||||
-rw-r--r-- | aoc11/src/main.rs | 18 |
2 files changed, 25 insertions, 0 deletions
diff --git a/aoc11/Cargo.toml b/aoc11/Cargo.toml new file mode 100644 index 0000000..d24e75d --- /dev/null +++ b/aoc11/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "aoc11" +version = "0.1.0" +authors = ["Justin Worthe <justin.worthe@gmail.com>"] + +[dependencies] +regex = "0.1" diff --git a/aoc11/src/main.rs b/aoc11/src/main.rs new file mode 100644 index 0000000..7bd3f21 --- /dev/null +++ b/aoc11/src/main.rs @@ -0,0 +1,18 @@ +extern crate regex; +use regex::Regex; + +use std::io::BufReader; +use std::io::prelude::*; +use std::fs::File; + +fn main() { + println!("Hello, world!"); +} + +fn read_file() -> Vec<String> { + let file = BufReader::new(File::open("input.txt").unwrap()); + file.lines() + .map(|line| line.unwrap().trim().to_string()) + .filter(|line| line.len() > 0) + .collect() +} |