diff --git a/src/lib.rs b/src/lib.rs index 9ee612fe..1e97f693 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,9 +4,6 @@ #[macro_use] extern crate error_chain; -#[macro_use] -extern crate clap; - #[macro_use] extern crate lazy_static; @@ -21,17 +18,17 @@ extern crate shell_words; extern crate syntect; extern crate wild; -mod assets; -mod config; -mod diff; -mod dirs; -mod inputfile; -mod line_range; -mod preprocessor; -mod style; -mod syntax_mapping; -mod terminal; -mod util; +pub mod assets; +pub mod config; +pub mod diff; +pub mod dirs; +pub mod inputfile; +pub mod line_range; +pub mod preprocessor; +pub mod style; +pub mod syntax_mapping; +pub mod terminal; +pub mod util; mod errors { error_chain! { @@ -42,18 +39,4 @@ mod errors { ParseIntError(::std::num::ParseIntError); } } - - pub fn handle_error(error: &Error) { - match error { - Error(ErrorKind::Io(ref io_error), _) - if io_error.kind() == ::std::io::ErrorKind::BrokenPipe => - { - ::std::process::exit(0); - } - _ => { - use ansi_term::Colour::Red; - eprintln!("{}: {}", Red.paint("[bat error]"), error); - } - }; - } } \ No newline at end of file