(arguments: I)
| 24 | } |
| 25 | |
| 26 | fn run_app<I, T>(arguments: I) |
| 27 | where |
| 28 | I: IntoIterator<Item = T>, |
| 29 | T: Into<OsString> + Clone, |
| 30 | { |
| 31 | let arg_matches = parse_arg_matches(arguments); |
| 32 | |
| 33 | match run(arg_matches) { |
| 34 | Ok(()) => {} |
| 35 | Err(err) => { |
| 36 | eprintln!("{} {}", "error:".red().bold(), err); |
| 37 | process::exit(1); |
| 38 | } |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | pub fn executable_name() -> String { |
| 43 | let name = std::env::current_exe() |
no test coverage detected