Function mpot::run_app

source ·
pub(crate) fn run_app(opt: Opt) -> Result<()>
Examples found in repository?
cli/src/main.rs (line 971)
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
fn main() -> std::result::Result<(), i32> {
    let opt = Opt::parse();
    stderrlog::new()
        .module(module_path!())
        .module("mailpot")
        .quiet(opt.quiet)
        .verbosity(opt.verbose as usize)
        .timestamp(opt.ts.unwrap_or(stderrlog::Timestamp::Off))
        .init()
        .unwrap();
    if let Err(err) = run_app(opt) {
        print!("{}", err.display_chain());
        std::process::exit(-1);
    }
    Ok(())
}