2023-01-20 23:40:31 -05:00
|
|
|
#![deny(clippy::all)]
|
|
|
|
#![warn(clippy::cargo, clippy::pedantic)]
|
2023-01-26 19:36:06 -05:00
|
|
|
#![allow(
|
2023-02-05 19:13:58 -05:00
|
|
|
clippy::cargo_common_metadata,
|
2023-01-26 19:36:06 -05:00
|
|
|
clippy::match_bool,
|
2023-02-03 14:15:20 -05:00
|
|
|
clippy::module_name_repetitions,
|
|
|
|
clippy::multiple_crate_versions,
|
|
|
|
clippy::needless_pass_by_value
|
2023-01-26 19:36:06 -05:00
|
|
|
)]
|
2023-01-18 21:11:47 -05:00
|
|
|
|
2023-01-24 02:05:54 -05:00
|
|
|
use std::process::ExitCode;
|
|
|
|
|
2023-01-18 20:47:14 -05:00
|
|
|
use clap::Parser;
|
|
|
|
|
2023-02-10 12:14:28 +01:00
|
|
|
pub(crate) mod cli;
|
|
|
|
|
2023-01-18 20:47:14 -05:00
|
|
|
use cli::Cli;
|
2023-03-08 12:56:08 +01:00
|
|
|
use console::style;
|
2023-01-18 20:47:14 -05:00
|
|
|
|
2023-02-13 15:28:18 +01:00
|
|
|
#[tokio::main(flavor = "multi_thread")]
|
2023-03-08 12:56:08 +01:00
|
|
|
async fn main() -> ExitCode {
|
2023-08-22 09:43:27 -05:00
|
|
|
tracing_subscriber::fmt()
|
|
|
|
.compact()
|
2023-08-22 10:38:08 -05:00
|
|
|
.with_max_level(tracing::Level::ERROR)
|
2023-08-22 09:43:27 -05:00
|
|
|
.with_target(true)
|
|
|
|
.with_timer(tracing_subscriber::fmt::time::uptime())
|
|
|
|
.with_level(true)
|
2023-04-30 20:48:47 +02:00
|
|
|
.init();
|
2023-03-08 12:56:08 +01:00
|
|
|
match Cli::parse().run().await {
|
|
|
|
Ok(code) => code,
|
|
|
|
Err(err) => {
|
|
|
|
eprintln!(
|
|
|
|
"{}{}{}\n{err:?}",
|
|
|
|
style("[").dim(),
|
|
|
|
style("ERROR").red(),
|
|
|
|
style("]").dim(),
|
|
|
|
);
|
|
|
|
ExitCode::FAILURE
|
|
|
|
}
|
|
|
|
}
|
2023-01-18 20:47:14 -05:00
|
|
|
}
|