(text: &'a str, prefix: &str)
| 680 | } |
| 681 | |
| 682 | fn budget_line_value<'a>(text: &'a str, prefix: &str) -> Option<&'a str> { |
| 683 | text.lines() |
| 684 | .map(str::trim) |
| 685 | .find_map(|line| line.strip_prefix("- ")?.trim().strip_prefix(prefix)) |
| 686 | .or_else(|| { |
| 687 | text.lines() |
| 688 | .map(str::trim) |
| 689 | .find_map(|line| line.strip_prefix(prefix)) |
| 690 | }) |
| 691 | .map(str::trim) |
| 692 | } |
| 693 | |
| 694 | fn parse_budget_count(value: &str) -> Option<i64> { |
| 695 | let digits = value |
no outgoing calls
no test coverage detected