diff options
| author | Nathan Jaremko | 2019-03-02 20:30:54 -0500 |
|---|---|---|
| committer | Nathan Jaremko | 2019-03-02 20:30:54 -0500 |
| commit | 9c9fb906cd6c05105d96fa586f429764b12169ca (patch) | |
| tree | 1499d2e38c368952886fb72a01251be47448603c /src/main.rs | |
| parent | 2d34d8e812f3e85b0d10f126bf5f334847d0fbca (diff) | |
| download | podcast-9c9fb906cd6c05105d96fa586f429764b12169ca.tar.bz2 | |
0.10.0 - Lots of Improvements
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/src/main.rs b/src/main.rs index b9085bb..bdf913a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,10 +1,11 @@ -#![recursion_limit = "1024"] +#![feature(impl_trait_in_bindings)] extern crate chrono; extern crate clap; extern crate dirs; +#[allow(unused_imports)] #[macro_use] -extern crate error_chain; +extern crate failure; #[macro_use] extern crate lazy_static; extern crate rayon; @@ -17,28 +18,35 @@ extern crate serde_json; extern crate serde_yaml; extern crate toml; -pub mod actions; -pub mod match_handler; -pub mod migration_handler; -pub mod parser; -pub mod structs; -pub mod utils; -pub mod errors { - error_chain! {} +mod actions; +mod arg_parser; +mod command_handler; +mod commands; +mod download; +mod migration_handler; +mod parser; +mod playback; +mod structs; +mod utils; + +mod errors { + use failure::Error; + use std::result; + pub type Result<T> = result::Result<T, Error>; } -use self::errors::*; use self::structs::*; +use errors::Result; -const VERSION: &str = "0.9.1"; +const VERSION: &str = "0.10.0"; fn main() -> Result<()> { - utils::create_directories().chain_err(|| "unable to create directories")?; - migration_handler::migrate_old_subscriptions()?; - let mut state = State::new(VERSION).chain_err(|| "unable to load state")?; + utils::create_directories()?; + migration_handler::migrate()?; + let mut state = State::new(VERSION)?; let config = Config::new()?; let mut app = parser::get_app(&VERSION); let matches = app.clone().get_matches(); - match_handler::handle_matches(&VERSION, &mut state, &config, &mut app, &matches)?; - state.save().chain_err(|| "unable to save state") + command_handler::handle_matches(&VERSION, &mut state, &config, &mut app, &matches)?; + state.save() } |
