diff options
author | Justin Worthe <justin.worthe@gmail.com> | 2016-12-10 11:06:36 +0200 |
---|---|---|
committer | Justin Worthe <justin.worthe@gmail.com> | 2016-12-10 11:06:36 +0200 |
commit | cce9dc3e4eee41d5898b3e6576e0528c58f6e401 (patch) | |
tree | 251f6e93b0ed3945b90475e7bdb92cc58109c432 /aoc11 | |
parent | e51ad23e3b6385c3666ffc9f4f37b195fbfdc3c3 (diff) |
AOC10
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() +} |