fixrs 0.1.1

Blazing-fast CLI to replace Rust qualified paths with use statements, auto-fixing clippy::absolute_paths
Documentation
use std::process::exit;

use clap::{Args, FromArgMatches};
use fixrs::{Options, finish_run, run};

fn main() {
  let Some(matches) = clap_args::parse!(|cmd| {
    let cmd = Options::augment_args(cmd);
    Options::apply_i18n(cmd)
  }) else {
    return;
  };

  let options = match Options::from_arg_matches(&matches) {
    Ok(opts) => opts,
    Err(e) => e.exit(),
  };

  match run(&options) {
    Ok(summary) => finish_run(&summary, &options),
    Err(e) => {
      eprintln!("Error: {e}");
      exit(1);
    }
  }
}