mirror of
https://github.com/numtide/treefmt.git
synced 2024-08-16 20:30:25 +03:00
chore: rename args to cli
This commit is contained in:
parent
338c997326
commit
da9a006cb0
@ -69,18 +69,17 @@ struct Cli {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main() -> ExitCode {
|
fn main() -> ExitCode {
|
||||||
// TODO: Avoid using this unwrap by migrating this logic to clap
|
let cli = ensure_args_defaults(Cli::parse()).unwrap();
|
||||||
let args = ensure_args_defaults(Cli::parse()).unwrap();
|
|
||||||
|
|
||||||
// Configure the logger
|
// Configure the logger
|
||||||
env_logger::builder()
|
env_logger::builder()
|
||||||
.format_timestamp(None)
|
.format_timestamp(None)
|
||||||
.format_target(false)
|
.format_target(false)
|
||||||
.filter_level(args.verbose.log_level_filter())
|
.filter_level(cli.verbose.log_level_filter())
|
||||||
.init();
|
.init();
|
||||||
|
|
||||||
// Run the app!
|
// Run the app!
|
||||||
match run_arg_command(args) {
|
match run_arg_command(cli) {
|
||||||
Ok(()) => ExitCode::SUCCESS,
|
Ok(()) => ExitCode::SUCCESS,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
error!("{}", e);
|
error!("{}", e);
|
||||||
|
Loading…
Reference in New Issue
Block a user