fn run() -> i32 {
    // Parse command-line options.
    let cli_opts = cli::CliOptions::from_args();

    // Setup logging.
    env_logger::Builder::from_default_env()
        .format_timestamp(None)
        .format_module_path(false)
        .filter(Some(crate_name!()), cli_opts.loglevel())
        .init();

    // Dispatch CLI subcommand.
    match cli_opts.run() {
        Ok(_) => libc::EXIT_SUCCESS,
        Err(e) => {
            log_error_chain(e);
            libc::EXIT_FAILURE
        }
    }
}
/// Run till completion or failure, pretty-printing termination errors if any.
Run till completion or failure, pretty-printing termination errors if any.
Run till completion or failure pretty - printing termination errors if any .
fn run() -> i32 {
    // Parse command-line options.
    let cli_opts = cli::CliOptions::from_args();
    // Setup logging.
    env_logger::Builder::from_default_env()
        .format_timestamp(None)
        .format_module_path(false)
        .filter(Some(crate_name!()), cli_opts.loglevel())
        .init();
    // Dispatch CLI subcommand.
    match cli_opts.run() {
        Ok(_) => libc::EXIT_SUCCESS,
        Err(e) => {
            log_error_chain(e);
            libc::EXIT_FAILURE
        }
    }
}
fn run ( ) -> i32 { // Parse command-line options. let cli_opts = cli :: CliOptions :: from_args ( ) ; // Setup logging. env_logger :: Builder :: from_default_env ( ) . format_timestamp ( None ) . format_module_path ( false ) . filter ( Some ( crate_name ! ( ) ) , cli_opts . loglevel ( ) ) . init ( ) ; // Dispatch CLI subcommand. match cli_opts . run ( ) { Ok ( _ ) => libc :: EXIT_SUCCESS , Err ( e ) => { log_error_chain ( e ) ; libc :: EXIT_FAILURE } } }
Run till completion or failure, pretty-printing termination errors if any.
Run till completion or failure pretty - printing termination errors if any .