refactor to a library, add integration tests

This commit is contained in:
Dustin J. Mitchell 2018-11-12 18:25:47 -05:00
parent 9f310c76bd
commit d0744d5178
8 changed files with 56 additions and 59 deletions

18
src/lib.rs Normal file
View file

@ -0,0 +1,18 @@
#![recursion_limit = "1024"]
extern crate chrono;
extern crate uuid;
#[macro_use]
extern crate error_chain;
mod tdb2;
mod task;
mod errors;
use std::io::BufRead;
pub use task::*;
pub use errors::*;
pub fn parse(filename: &str, reader: impl BufRead) -> Result<Vec<Task>> {
Ok(tdb2::parse(filename, reader)?)
}