Format a count with singular/plural suffix.
(count: usize, singular: &str)
| 126 | |
| 127 | /// Format a count with singular/plural suffix. |
| 128 | fn format_count(count: usize, singular: &str) -> String { |
| 129 | if count == 1 { |
| 130 | format!("{} {}", count, singular) |
| 131 | } else { |
| 132 | format!("{} {}s", count, singular) |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | // Test Helpers |
| 137 |
nothing calls this directly
no outgoing calls
no test coverage detected