extern crate kern; use kern::meta::version; use std::error::Error; use std::process::exit; static CARGO_TOML: &str = include_str!("../Cargo.toml"); /// Print version pub fn print_version() { println!("Filers {} (c) 2019 Lennart Heinrich", version(CARGO_TOML)); } // print error and exit 2 pub fn error(error: E) -> ! where E: Error, { println!("{}", error); exit(2) } // print unknown and exit 3 pub fn unknown_error() -> ! { println!("An unknown error occured"); exit(3) }