MCPcopy Create free account
hub / github.com/ccusage/ccusage / find_help_page

Function find_help_page

rust/crates/ccusage-cli/src/help.rs:59–68  ·  view source on GitHub ↗
(tokens: &[String])

Source from the content-addressed store, hash-verified

57}
58
59fn find_help_page(tokens: &[String]) -> Option<&'static HelpPage> {
60 HELP_PAGES.iter().find(|page| {
61 page.path.len() == tokens.len()
62 && page
63 .path
64 .iter()
65 .zip(tokens)
66 .all(|(expected, actual)| *expected == actual)
67 })
68}
69
70fn root_help_text() -> String {
71 let mut lines = vec!["USAGE:".to_string()];

Callers 1

help_text_for_tokensFunction · 0.85

Calls 3

findMethod · 0.80
lenMethod · 0.80
allMethod · 0.80

Tested by

no test coverage detected