MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / main

Function main

src/main.rs:6–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4
5#[tokio::main(flavor = "current_thread")]
6async fn main() {
7 let res = cli::run().await;
8 if let Err(err) = res {
9 // Show the primary error
10 let mut chain = err.chain();
11 if let Some(primary) = chain.next() {
12 if log_enabled!(log::Level::Error) {
13 log::error!("{}", style(primary).red());
14 } else {
15 eprintln!("{} {}", style("Error:").bold().red(), style(primary).red());
16 }
17 }
18 // Show causes in debug mode
19 if log_enabled!(log::Level::Debug) {
20 for cause in chain {
21 log::debug!("Caused by: {cause}");
22 }
23 }
24 clean_logger();
25 std::process::exit(1);
26 }
27}

Callers

nothing calls this directly

Calls 3

clean_loggerFunction · 0.85
nextMethod · 0.80
runFunction · 0.50

Tested by

no test coverage detected