(arg: &str)
| 42 | } |
| 43 | |
| 44 | fn is_program_name(arg: &str) -> bool { |
| 45 | let name = Path::new(arg) |
| 46 | .file_name() |
| 47 | .and_then(|name| name.to_str()) |
| 48 | .unwrap_or(arg) |
| 49 | .rsplit('\\') |
| 50 | .next() |
| 51 | .unwrap_or(arg); |
| 52 | matches!(name, "ccusage" | "ccusage.exe") |
| 53 | } |
| 54 | |
| 55 | fn help_text_for_tokens(tokens: &[String]) -> String { |
| 56 | find_help_page(tokens).map_or_else(root_help_text, render_help_page) |
no test coverage detected