Coverage / src/main.rs 100.0%
10 of 10 lines run, 1 of 2 functions · run #25 on main · run missed
| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | | mod cli; |
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | | #[global_allocator] |
| 11 | | static ALLOC: mimalloc::MiMalloc = mimalloc::MiMalloc; |
| 12 | |
|
| 13 | 164× | fn main() { |
| 14 | | |
| 15 | | |
| 16 | | #[cfg(unix)] |
| 17 | 164× | unsafe { |
| 18 | 164× | libc::signal(libc::SIGPIPE, libc::SIG_DFL); |
| 19 | 164× | } |
| 20 | 164× | match cli::run() { |
| 21 | 146× | Ok(code) => std::process::exit(code), |
| 22 | 18× | Err(e) => { |
| 23 | 18× | cli::ui::init(false); |
| 24 | 18× | eprintln!("{} {e:#}", cli::ui::err("error:")); |
| 25 | 18× | std::process::exit(1); |
| 26 | | } |
| 27 | | } |
| 28 | | } |